Open
Description
How do you use Sentry?
Sentry Saas (sentry.io)
Version
1.5.12
Steps to Reproduce
This task performs some writes to Redis, see a transaction on Sentry of this task.
Running the task generates that transaction.
Transaction in JSON
{
"event_id": "7f2e153b30584487b572b291e3144d7f",
"project": 1,
"release": "[email protected]+0a00d9db9da5ff155435757775d21dd7a7ba9659",
"dist": null,
"platform": "python",
"message": "",
"datetime": "2022-06-21T14:57:13.779444+00:00",
"tags": [
[
"celery_task_id",
"743fc368-5734-44c8-b2f7-3bf1000d97dc"
],
[
"environment",
"prod"
],
[
"level",
"info"
],
[
"public_key",
"0265d96e5e744f0b93b9afef2e740c9f"
],
[
"runtime",
"CPython 3.8.12"
],
[
"runtime.name",
"CPython"
],
[
"release",
"[email protected]+0a00d9db9da5ff155435757775d21dd7a7ba9659"
],
[
"server_name",
"getsentry-worker-relay-config-production-844774654-zg9sf"
],
[
"status",
"ok"
],
[
"task_name",
"sentry.tasks.relay.build_project_config"
],
[
"transaction",
"sentry.tasks.relay.build_project_config"
]
],
"_metrics": {
"bytes.ingested.event": 15233,
"bytes.stored.event": 18090
},
"breakdowns": {
"span_ops": {
"ops.db": {
"value": 3.047,
"unit": "millisecond"
},
"ops.http": {
"value": 11.121,
"unit": "millisecond"
},
"total.time": {
"value": 59.313,
"unit": "millisecond"
}
}
},
"contexts": {
"kwargs": {
"type": "kwargs"
},
"runtime": {
"name": "CPython",
"version": "3.8.12",
"build": "3.8.12 (default, Mar 2 2022, 05:21:43) \n[GCC 8.3.0]",
"type": "runtime"
},
"trace": {
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"span_id": "af5cd9563445c57f",
"parent_span_id": "9882f544a4d202d4",
"op": "celery.task",
"status": "ok",
"exclusive_time": 16.293,
"hash": "0ff2054d75c07272",
"type": "trace"
}
},
"culprit": "sentry.tasks.relay.build_project_config",
"environment": "prod",
"extra": {
"celery-job": {
"args": [
],
"kwargs": {
"public_key": "0265d96e5e744f0b93b9afef2e740c9f"
},
"task_name": "sentry.tasks.relay.build_project_config"
},
"sys.argv": [
"/usr/src/sentry/src/sentry/__main__.py",
"run",
"worker",
"--concurrency=16",
"--max-tasks-per-child=10000",
"--queues=relay_config"
]
},
"grouping_config": {
"enhancements": "eJybzDRxY25-UmZOqpWRgZGhroGJroHRlEkT9xZoaekXFyXrF6fmlRRV6qck6RfkF5ekF6UW62tpTTrLzHCWmXHSxF1oykpLMnOKgYr1Cirham5qYJqVm5-SClSYm5iXmJ5apJ-UWJyKrGV1WlFiZnFqfFpRfi5UEABqeD5V",
"id": "mobile:2021-02-12"
},
"key_id": "755931",
"level": "info",
"location": "sentry.tasks.relay.build_project_config",
"logger": "",
"metadata": {
"location": "sentry.tasks.relay.build_project_config",
"title": "sentry.tasks.relay.build_project_config"
},
"nodestore_insert": 1655823438.890994,
"received": 1655823433.788562,
"sdk": {
"name": "sentry.python",
"version": "1.5.12",
"integrations": [
"argv",
"atexit",
"celery",
"dedupe",
"django",
"django_atomic",
"excepthook",
"logging",
"modules",
"redis",
"rust_info",
"stdlib",
"threading"
],
"packages": [
{
"name": "pypi:sentry-sdk",
"version": "1.5.12"
}
]
},
"span_grouping_config": {
"id": "default:2021-08-25"
},
"spans": [
{
"timestamp": 1655823433.743525,
"start_timestamp": 1655823433.74244,
"exclusive_time": 1.085,
"description": "SELECT \"sentry_projectkey\".\"id\", \"sentry_projectkey\".\"project_id\", \"sentry_projectkey\".\"label\", \"sentry_projectkey\".\"public_key\", \"sentry_projectkey\".\"secret_key\", \"sentry_projectkey\".\"roles\", \"sentry_projectkey\".\"status\", \"sentry_projectkey\".\"date_added\", \"sentry_projectkey\".\"rate_limit_count\", \"sentry_projectkey\".\"rate_limit_window\", \"sentry_projectkey\".\"data\" FROM \"sentry_projectkey\" WHERE \"sentry_projectkey\".\"public_key\" = %s",
"op": "db",
"span_id": "a14131e9c071926a",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "628aa2d22dfbd48b",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.743815,
"start_timestamp": 1655823433.743794,
"exclusive_time": 0.021,
"op": "sentry.utils.json.loads",
"span_id": "ba13fd6a260d85a5",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.745571,
"start_timestamp": 1655823433.744725,
"exclusive_time": 0.846,
"description": "SELECT \"sentry_project\".\"id\", \"sentry_project\".\"slug\", \"sentry_project\".\"name\", \"sentry_project\".\"forced_color\", \"sentry_project\".\"organization_id\", \"sentry_project\".\"public\", \"sentry_project\".\"date_added\", \"sentry_project\".\"status\", \"sentry_project\".\"first_event\", \"sentry_project\".\"flags\", \"sentry_project\".\"platform\" FROM \"sentry_project\" WHERE \"sentry_project\".\"id\" = %s",
"op": "db",
"span_id": "aff4346a1d32432f",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "5f2888f53b4bf622",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.747542,
"start_timestamp": 1655823433.746426,
"exclusive_time": 1.116,
"description": "SELECT \"sentry_organization\".\"id\", \"sentry_organization\".\"name\", \"sentry_organization\".\"slug\", \"sentry_organization\".\"status\", \"sentry_organization\".\"date_added\", \"sentry_organization\".\"default_role\", \"sentry_organization\".\"flags\" FROM \"sentry_organization\" WHERE \"sentry_organization\".\"id\" = %s",
"op": "db",
"span_id": "a5149e79f8f6d70c",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "0b1509e070725a8b",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.758339,
"start_timestamp": 1655823433.757805,
"exclusive_time": 0.534,
"op": "redis.get_quotas.get_project_quota",
"span_id": "b4d5217b4b867fa0",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"project.id": "5724801"
},
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.758413,
"start_timestamp": 1655823433.758383,
"exclusive_time": 0.03,
"op": "redis.get_quotas.get_organization_quota",
"span_id": "b3e3cdee62e6b523",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"project.organization.id": "139169"
},
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.758838,
"start_timestamp": 1655823433.758431,
"exclusive_time": 0.407,
"op": "redis.get_quotas.get_key_quota",
"span_id": "831d209530bd374b",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"key.id": "1590334"
},
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.772651,
"start_timestamp": 1655823433.76002,
"exclusive_time": 0.898,
"op": "get_public_config",
"span_id": "a745592b414d7a17",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.763111,
"start_timestamp": 1655823433.760723,
"exclusive_time": 0.085,
"description": "checking a flag",
"op": "feature.flagr.has",
"span_id": "99fe2dadb7a4311d",
"parent_span_id": "a745592b414d7a17",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"flagr.flag_count": "1",
"flagr.project_count": "0"
},
"hash": "742f14033a404391",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.760849,
"start_timestamp": 1655823433.760753,
"exclusive_time": 0.035,
"op": "feature.flagr.build_entities",
"span_id": "ba9e946a3e97480a",
"parent_span_id": "99fe2dadb7a4311d",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.760832,
"start_timestamp": 1655823433.760771,
"exclusive_time": 0.061,
"op": "feature.flagr.get_context",
"span_id": "96e4a177fc70975b",
"parent_span_id": "ba9e946a3e97480a",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.76307,
"start_timestamp": 1655823433.760872,
"exclusive_time": 0.684,
"description": "checking flags for entities",
"op": "feature.flagr.evaluation",
"span_id": "bf5367a6bdcce582",
"parent_span_id": "99fe2dadb7a4311d",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"flagr.entities": "1",
"flagr.valid_features": "1"
},
"hash": "ae21f3a2495fe81c",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.762742,
"start_timestamp": 1655823433.761285,
"exclusive_time": 1.457,
"description": "POST http://127.0.0.1:10007/api/v1/evaluation",
"op": "http",
"span_id": "80819c719e39609f",
"parent_span_id": "bf5367a6bdcce582",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"http.status_code": "200",
"status": "ok"
},
"data": {
"method": "POST",
"reason": "OK",
"status_code": 200,
"url": "http://127.0.0.1:10007/api/v1/evaluation"
},
"hash": "b541a34834d13605",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.763052,
"start_timestamp": 1655823433.762995,
"exclusive_time": 0.057,
"op": "sentry.utils.json.loads",
"span_id": "a0993b4e55459f6c",
"parent_span_id": "bf5367a6bdcce582",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.763107,
"start_timestamp": 1655823433.763098,
"exclusive_time": 0.009,
"op": "feature.flagr.parse_results",
"span_id": "a1fe066da6768c01",
"parent_span_id": "99fe2dadb7a4311d",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.772564,
"start_timestamp": 1655823433.763219,
"exclusive_time": 0.074,
"description": "checking a flag",
"op": "feature.flagr.has",
"span_id": "b529f30ce6c11074",
"parent_span_id": "a745592b414d7a17",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"flagr.flag_count": "1",
"flagr.project_count": "0"
},
"hash": "742f14033a404391",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.763338,
"start_timestamp": 1655823433.763248,
"exclusive_time": 0.035,
"op": "feature.flagr.build_entities",
"span_id": "bb57295a508b59db",
"parent_span_id": "b529f30ce6c11074",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.763324,
"start_timestamp": 1655823433.763269,
"exclusive_time": 0.055,
"op": "feature.flagr.get_context",
"span_id": "88f9f6a073dde4e2",
"parent_span_id": "bb57295a508b59db",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.772533,
"start_timestamp": 1655823433.76336,
"exclusive_time": 0.565,
"description": "checking flags for entities",
"op": "feature.flagr.evaluation",
"span_id": "8a28f061faec65ef",
"parent_span_id": "b529f30ce6c11074",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"flagr.entities": "1",
"flagr.valid_features": "1"
},
"hash": "ae21f3a2495fe81c",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.772155,
"start_timestamp": 1655823433.763588,
"exclusive_time": 8.567,
"description": "POST http://127.0.0.1:10007/api/v1/evaluation",
"op": "http",
"span_id": "b18235ba5587e316",
"parent_span_id": "8a28f061faec65ef",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"http.status_code": "200",
"status": "ok"
},
"data": {
"method": "POST",
"reason": "OK",
"status_code": 200,
"url": "http://127.0.0.1:10007/api/v1/evaluation"
},
"hash": "b541a34834d13605",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.77252,
"start_timestamp": 1655823433.772479,
"exclusive_time": 0.041,
"op": "sentry.utils.json.loads",
"span_id": "a3f8ec75f407e529",
"parent_span_id": "8a28f061faec65ef",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.772561,
"start_timestamp": 1655823433.772553,
"exclusive_time": 0.008,
"op": "feature.flagr.parse_results",
"span_id": "832df3601e104d44",
"parent_span_id": "b529f30ce6c11074",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.774895,
"start_timestamp": 1655823433.772741,
"exclusive_time": 0.066,
"description": "checking a flag",
"op": "feature.flagr.has",
"span_id": "8bca3c24a7904f0a",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"flagr.flag_count": "1",
"flagr.project_count": "0"
},
"hash": "742f14033a404391",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.772873,
"start_timestamp": 1655823433.772769,
"exclusive_time": 0.024,
"op": "feature.flagr.build_entities",
"span_id": "b6684b5543ffaa21",
"parent_span_id": "8bca3c24a7904f0a",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.772862,
"start_timestamp": 1655823433.772782,
"exclusive_time": 0.08,
"op": "feature.flagr.get_context",
"span_id": "938301808a804ee3",
"parent_span_id": "b6684b5543ffaa21",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.774867,
"start_timestamp": 1655823433.77289,
"exclusive_time": 0.842,
"description": "checking flags for entities",
"op": "feature.flagr.evaluation",
"span_id": "9cfd2f18e15631d8",
"parent_span_id": "8bca3c24a7904f0a",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"flagr.entities": "1",
"flagr.valid_features": "1"
},
"hash": "ae21f3a2495fe81c",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.774608,
"start_timestamp": 1655823433.773511,
"exclusive_time": 1.097,
"description": "POST http://127.0.0.1:10007/api/v1/evaluation",
"op": "http",
"span_id": "b0b37bfe38f34f59",
"parent_span_id": "9cfd2f18e15631d8",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"http.status_code": "200",
"status": "ok"
},
"data": {
"method": "POST",
"reason": "OK",
"status_code": 200,
"url": "http://127.0.0.1:10007/api/v1/evaluation"
},
"hash": "b541a34834d13605",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.774855,
"start_timestamp": 1655823433.774817,
"exclusive_time": 0.038,
"op": "sentry.utils.json.loads",
"span_id": "88c54719e1cbfb36",
"parent_span_id": "9cfd2f18e15631d8",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.774894,
"start_timestamp": 1655823433.774887,
"exclusive_time": 0.007,
"op": "feature.flagr.parse_results",
"span_id": "bf0549e2a8f7cc60",
"parent_span_id": "8bca3c24a7904f0a",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.775121,
"start_timestamp": 1655823433.775112,
"exclusive_time": 0.009,
"description": "checking a flag",
"op": "feature.flagr.has",
"span_id": "900269b51e9dc482",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"flagr.flag_count": "1",
"flagr.project_count": "0",
"skip_reason": "no_features"
},
"hash": "742f14033a404391",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.775153,
"start_timestamp": 1655823433.775148,
"exclusive_time": 0.005,
"description": "checking a flag",
"op": "feature.flagr.has",
"span_id": "a0d2f461167fe3e3",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"flagr.flag_count": "1",
"flagr.project_count": "0",
"skip_reason": "no_features"
},
"hash": "742f14033a404391",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.775346,
"start_timestamp": 1655823433.77522,
"exclusive_time": 0.126,
"op": "get_filter_settings",
"span_id": "97f49b1af7769ec3",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.775903,
"start_timestamp": 1655823433.775364,
"exclusive_time": 0.539,
"op": "get_grouping_config_dict_for_project",
"span_id": "bf6e29ec0b81fc8f",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.775982,
"start_timestamp": 1655823433.775938,
"exclusive_time": 0.044,
"op": "get_event_retention",
"span_id": "b83c4116210cbd15",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.778129,
"start_timestamp": 1655823433.775997,
"exclusive_time": 1.682,
"op": "get_all_quotas",
"span_id": "a265683e08453a66",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.777018,
"start_timestamp": 1655823433.776922,
"exclusive_time": 0.096,
"op": "redis.get_quotas.get_project_quota",
"span_id": "8411f2a8152e6f6f",
"parent_span_id": "a265683e08453a66",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"project.id": "5724801"
},
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.7771,
"start_timestamp": 1655823433.777074,
"exclusive_time": 0.026,
"op": "redis.get_quotas.get_organization_quota",
"span_id": "8f75bb57a07b0f48",
"parent_span_id": "a265683e08453a66",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"project.organization.id": "139169"
},
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.777445,
"start_timestamp": 1655823433.777117,
"exclusive_time": 0.328,
"op": "redis.get_quotas.get_key_quota",
"span_id": "a0e0d5c8b2dba1a4",
"parent_span_id": "a265683e08453a66",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"key.id": "1590334"
},
"hash": "d41d8cd98f00b204",
"same_process_as_parent": true
},
{
"timestamp": 1655823433.779096,
"start_timestamp": 1655823433.77876,
"exclusive_time": 0.336,
"description": "DEL 'relayconfig-debounce:k:0265d96e5e744f0b93b9afef2e740c9f'",
"op": "redis",
"span_id": "98ba5b778e9fe34d",
"parent_span_id": "af5cd9563445c57f",
"trace_id": "c4f136ada35842f5ad6f5989343b3856",
"tags": {
"redis.command": "DEL",
"redis.key": "relayconfig-debounce:k:0265d96e5e744f0b93b9afef2e740c9f"
},
"hash": "2bbe23c0e8b3f638",
"same_process_as_parent": true
}
],
"start_timestamp": 1655823433.741136,
"timestamp": 1655823433.779444,
"title": "sentry.tasks.relay.build_project_config",
"transaction": "sentry.tasks.relay.build_project_config",
"type": "transaction",
"version": "7"
}
Expected Result
All Redis operations happening in this task and captured in this transaction are instrumented, including SET
operations in Redis and leaving no gaps caused by missing spans.
Actual Result
There are some missing spans, causing gaps in the transaction. Specifically, there are no spans for the SET
operation in Redis.