-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Pika #217
Add support for Pika #217
Conversation
Test setup: appsignal/test-setups#212 |
Add instrumentation support for Pika messages. The global messaging extractor already covers the cases this instrumentation adds, so there's no need for a specific extractor so far.
b132395
to
d6d9724
Compare
TL;DR: The instrumentation does some wacky stuff here that our global extractor is not ready to handle. I think it would be good to add a custom extractor for Pika in the agent to fix this. [This is some explanation about the weird stuff the global extractor is doing with these spans and why -- feel free to skip it] There are two spans here, one for sending the span and another for receiving it, that the Pika instrumentation for Python, in the test setup, sends with the names "test send" and "test receive". These are actually pretty great span names! They are low cardinality, and they refer to the something that is meaningful to the user (the queue name, in this case "test") and a clear action ("send", "receive") But then, because the attributes are not correctly set, the global extractor does not know what to do with these spans, and it messes them up in different ways. For the send span, because there is no For the receive span, the opposite happens. Because there is a But, when it rewrites the name, because Thankfully this is why we have extractors! I would suggest a very simple extractor for Pika that doesn't use the messaging global extractor at all, instead just leaving the span name as-is, and setting the category using the last word of the span name (so, "send.pika", or "receive.pika"). Does that sound reasonable? |
Ah, the agent is also merging the trace for the consumer and the producer (because they are propagated as the same trace) Ideally, these would be two separate traces, like in Sidekiq, Celery or BullMQ. But this is harder to fix, so maybe we can leave it like this for now. |
thanks for the insight @unflxw, I'll work on an extractor |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This is a message from the daily scheduled checks. |
Add instrumentation support for Pika messages. The global messaging extractor already covers the cases this instrumentation adds, so there's no need for a specific extractor so far.
Action with message production:
Consumption action automatically instrumented
Part of: #181