#Breadcrumbs for metrics?
8 messages · Page 1 of 1 (latest)
Which SDK are you using and when do you emit your metrics in your code? Metrics are span seeking, and should attach themselves to the current active span.
We're using the Python SDK.
Here are the relevant code snippets:
- Transactions are started
- These transactions are sampled at 1.0
- I'm seeing the worker.message.success metrics, but no spans
Hey @slow wave your code looks good!
You do see the Transaction show up in Sentries "Performance" section, right?
Just from your metric you are not seeing the transaction, do I get this right?
One thing that could be happening: The metrics are ingested (because they are always ingested) but the transaction has been dropped because of sampling. Have you defined a traces_sample_rate?
Just a little heads up: We are currently working on some changes in our metrics api. So in the future you will have do something roughly like this:
with start_transaction(op="...", name="..."):
with start_span(op="...", description="...") as span:
sentry_sdk.set_tags(tag_dict)
if ...:
span.set_data("worker.router.unhandled_job_type", 1)
span.set_data("worker.message.success", 1)
span.set_data("worker.message.latency", (finish_time-start_time).total_seconds())