Skip to content

Filter out non-supported spans when ingesting traces to A365 Observability #71

Description

Issue:
Other span types were sent in the payload ---- and then these were dropped by our server (so this is not a blocking issue)

What're problems with this?
increase the payload with unnecessary content (spans)
add pressure & compute to A365 Observability service
real spans might get cut / truncated if exceeds payload limit somewhere
...

Other span types other than below 4 should be filtered out in the payload from the traces ingestion request

  • InvokeAgent
  • ExecuteTool
  • Inference (chat)
  • Output

e.g.,

Image

example body from the payload:

'{"resourceSpans":[{"resource":{"attributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.40.0","service.name":"unknown_service"}},"scopeSpans":[{"scope":{"name":"microsoft_agents","version":"1.0.0"},"spans":[{"traceId":"dc5ec9ef5aa6b2177d0900271f8e261a","spanId":"89c871058cb929c3","parentSpanId":"b309864f1f3355dc","name":"agents.app.before_turn","kind":"INTERNAL","startTimeUnixNano":1777234048106457300,"endTimeUnixNano":1777234048106457300,"attributes":{"microsoft.tenant.id":"badf1f56-284d-4dc5-ac59-0dd53900e743","gen_ai.conversation.id":"__PERSONAL_CHAT_ID__","microsoft.conversation.item.link":"http://localhost:56150/_connector","gen_ai.agent.id":"d6d31512-379f-4994-b901-c098dfd9293f","gen_ai.agent.name":"nikhilcagent0416 Agent User","gen_ai.agent.description":"agenticUser","microsoft.agent.user.email":"74ae7173-86f8-41b0-a237-c4c4822fb9bc","microsoft.channel.name":"msteams","user.id":"a92962f3-9ed4-4bcd-9ae0-ad0002b6ca76","user.name":"Alex Wilber"},"events":null,"links":null,"status":{"code":"OK","message":""}},{"traceId":"dc5ec9ef5aa6b2177d0900271f8e261a","spanId":"dbffe457e74da53f","parentSpanId":"b309864f1f3355dc","name":"agents.app.download_files","kind":"INTERNAL","startTimeUnixNano":1777234048106457300,"endTimeUnixNano":1777234048106457300,"attributes":{"microsoft.tenant.id":"badf1f56-284d-4dc5-ac59-0dd53900e743","gen_ai.conversation.id":"__PERSONAL_CHAT_ID__","microsoft.conversation.item.link":"http://localhost:56150/_connector","gen_ai.agent.id":"d6d31512-379f-4994-b901-c098dfd9293f","gen_ai.agent.name":"nikhilcagent0416 Agent User","gen_ai.agent.description":"agenticUser","microsoft.agent.user.email":"74ae7173-86f8-41b0-a237-c4c4822fb9bc","microsoft.channel.name":"msteams","user.id":"a92962f3-9ed4-4bcd-9ae0-ad0002b6ca76","user.name":"Alex Wilber","activity.attachments.count":0},"events":null,"links":null,"status":{"code":"OK","message":""}},{"traceId":"dc5ec9ef5aa6b2177d0900271f8e261a","spanId":"0e872b894d262829","parentSpanId":"88c956dec77ae5fa","name":"agents.connector.reply_to_activity","kind":"INTERNAL","startTimeUnixNano":1777234048108921800,"endTimeUnixNano":1777234048728513300,"attributes":{"microsoft.tenant.id":"badf1f56-284d-4dc5-ac59-0dd53900e743","gen_ai.conversation.id":"__PERSONAL_CHAT_ID__","microsoft.conversation.item.link":"http://localhost:56150/_connector","gen_ai.agent.id":"d6d31512-379f-4994-b901-c098dfd9293f","gen_ai.agent.name":"nikhilcagent0416 Agent User","gen_ai.agent.description":"agenticUser","microsoft.agent.user.email":"74ae7173-86f8-41b0-a237-c4c4822fb9bc","microsoft.channel.name":"msteams","user.id":"a92962f3-9ed4-4bcd-9ae0-ad0002b6ca76","user.name":"Alex Wilber","activity.conversation.id":"__PERSONAL_CHAT_ID__","activity.id":"17152ca3-e58e-4cd1-85ad-1918dbfb5ca3"},"events":null,"links":null,"status":{"code":"OK","message":""}},{"traceId":"dc5ec9ef5aa6b2177d0900271f8e261a","spanId":"88c956dec77ae5fa","parentSpanId":"adb3f078c5ca9cdf","name":"agents.adapter.send_activities","kind":"INTERNAL","startTimeUnixNano":1777234048108921800,"endTimeUnixNano":1777234048728513300,"attributes":{"microsoft.tenant.id":"badf1f56-284d-4dc5-ac59-0dd53900e743","gen_ai.conversation.id":"__PERSONAL_CHAT_ID__","microsoft.conversation.item.link":"http://localhost:56150/_connector","gen_ai.agent.id":"d6d31512-379f-4994-b901-c098dfd9293f","gen_ai.agent.name":"nikhilcagent0416 Agent User","gen_ai.agent.description":"agenticUser","microsoft.agent.user.email":"74ae7173-86f8-41b0-a237-c4c4822fb9bc","microsoft.channel.name":"msteams","user.id":"a92962f3-9ed4-4bcd-9ae0-ad0002b6ca76","user.name":"Alex Wilber","activities.count":1,"activity.conversation.id":"__PERSONAL_CHAT_ID__"},"events":null,"links":null,"status":{"code":"OK","message":""}},{"traceId":"dc5ec9ef5aa6b2177d0900271f8e261a","spanId":"adb3f078c5ca9cdf","parentSpanId":"b309864f1f3355dc","name":"agents.turn.send_activities","kind":"INTERNAL","startTimeUnixNano":1777234048108921800,"endTimeUnixNano":1777234048728513300,"attributes":{"microsoft.tenant.id":"badf1f56-284d-4dc5-ac59-0dd53900e743","gen_ai.conversation.id":"__PERSONAL_CHAT_ID__","microsoft.conversation.item.link":"http://localhost:56150/_connector","gen_ai.agent.id":"d6d31512-379f-4994-b901-c098dfd9293f","gen_ai.agent.name":"nikhilcagent0416 Agent User","gen_ai.agent.description":"agenticUser","microsoft.agent.user.email":"74ae7173-86f8-41b0-a237-c4c4822fb9bc","microsoft.channel.name":"msteams","user.id":"a92962f3-9ed4-4bcd-9ae0-ad0002b6ca76","user.name":"Alex Wilber","activity.conversation.id":"__PERSONAL_CHAT_ID__"},"events":null,"links":null,"status":{"code":"OK","message":""}},{"traceId":"dc5ec9ef5aa6b2177d0900271f8e261a","spanId":"dfdf57556600e244","parentSpanId":"25450ad8fc4d2495","name":"agents.authentication.get_agentic_instance_token","kind":"INTERNAL","startTimeUnixNano":1777234048108921800,"endTimeUnixNano":1777234048858915500,"attributes":{"microsoft.tenant.id":"badf1f56-284d-4dc5-ac59-0dd53900e743","gen_ai.conversation.id":"__PERSONAL_CHAT_ID__","microsoft.conversation.item.link":"http://localhost:56150/_connector","gen_ai.agent.id":"d6d31512-379f-4994-b901-c098dfd9293f","gen_ai.agent.name":"nikhilcagent0416 Agent User","gen_ai.agent.description":"agenticUser","microsoft.agent.user.email":"74ae7173-86f8-41b0-a237-c4c4822fb9bc","microsoft.channel.name":"msteams","user.id":"a92962f3-9ed4-4bcd-9ae0-ad0002b6ca76","user.name":"Alex Wilber","agentic.instance_id":"d6d31512-379f-4994-b901-c098dfd9293f"},"events":null,"links":null,"status":{"code":"OK","message":""}},{"traceId":"dc5ec9ef5aa6b2177d0900271f8e261a","spanId":"25450ad8fc4d2495","parentSpanId":"4f480126724e1bd6","name":"agents.authentication.get_agentic_user_token","kind":"INTERNAL","startTimeUnixNano":1777234048108921800,"endTimeUnixNano":1777234049743176500,"attributes":{"microsoft.tenant.id":"badf1f56-284d-4dc5-ac59-0dd53900e743","gen_ai.conversation.id":"__PERSONAL_CHAT_ID__","microsoft.conversation.item.link":"http://localhost:56150/_connector","gen_ai.agent.id":"d6d31512-379f-4994-b901-c098dfd9293f","gen_ai.agent.name":"nikhilcagent0416 Agent User","gen_ai.agent.description":"agenticUser","microsoft.agent.user.email":"74ae7173-86f8-41b0-a237-c4c4822fb9bc","microsoft.channel.name":"msteams","user.id":"a92962f3-9ed4-4bcd-9ae0-ad0002b6ca76","user.name":"Alex Wilber","agentic.instance_id":"d6d31512-379f-4994-b901-c098dfd9293f","agentic.user_id":"74ae7173-86f8-41b0-a237-c4c4822fb9bc","auth.scopes":"https://graph.microsoft.com/.default"},"events":null,"links":null,"status":{"code":"OK","message":""}},{"traceId":"dc5ec9ef5aa6b2177d0900271f8e261a","spanId":"4f480126724e1bd6","parentSpanId":"b309864f1f3355dc","name":"agents.authorization.agentic_token","kind":"INTERNAL","startTimeUnixNano":1777234048108921800,"endTimeUnixNano":1777234049743176500,"attributes":{"microsoft.tenant.id":"badf1f56-284d-4dc5-ac59-0dd53900e743","gen_ai.conversation.id":"__PERSONAL_CHAT_ID__","microsoft.conversation.item.link":"http://localhost:56150/_connector","gen_ai.agent.id":"d6d31512-379f-4994-b901-c098dfd9293f","gen_ai.agent.name":"nikhilcagent0416 Agent User","gen_ai.agent.description":"agenticUser","microsoft.agent.user.email":"74ae7173-86f8-41b0-a237-c4c4822fb9bc","microsoft.channel.name":"msteams","user.id":"a92962f3-9ed4-4bcd-9ae0-ad0002b6ca76","user.name":"Alex Wilber","auth.handler.id":"AGENTIC","auth.connection.name":"unknown"},"events":null,"links":null,"status":{"code":"OK","message":""}}]},{"scope":{"name":"opentelemetry.instrumentation.requests","version":"0.61b0"},"spans":[{"traceId":"dc5ec9ef5aa6b2177d0900271f8e261a","spanId":"0260580feaaa99f5","parentSpanId":"dfdf57556600e244","name":"GET","kind":"CLIENT","startTimeUnixNano":1777234048112865500,"endTimeUnixNano":1777234048719536500,"attributes":{"http.method":"GET","http.url":"https://login.microsoftonline.com/badf1f56-284d-4dc5-ac59-0dd53900e743/v2.0/.well-known/openid-configuration","user_agent.original":"python-requests/2.32.5","microsoft.tenant.id":"badf1f56-284d-4dc5-ac59-0dd53900e743","gen_ai.conversation.id":"__PERSONAL_CHAT_ID__","microsoft.conversation.item.link":"http://localhost:56150/_connector","gen_ai.agent.id":"d6d31512-379f-4994-b901-c098dfd9293f","gen_ai.agent.name":"nikhilcagent0416 Agent User","gen_ai.agent.description":"agenticUser","microsoft.agent.user.email":"74ae7173-86f8-41b0-a237-c4c4822fb9bc","microsoft.channel.name":"msteams","user.id":"a92962f3-9ed4-4bcd-9ae0-ad0002b6ca76","user.name":"Alex Wilber","http.status_code":200},"events":null,"links":null,"status":{"code":"UNSET","message":""}},{"traceId":"dc5ec9ef5aa6b2177d0900271f8e261a","spanId":"029b9f3ad911141b","parentSpanId":"dfdf57556600e244","name":"POST","kind":"CLIENT","startTimeUnixNano":1777234048724535800,"endTimeUnixNano":1777234048857914900,"attributes":{"http.method":"POST","http.url":"https://login.microsoftonline.com/badf1f56-284d-4dc5-ac59-0dd53900e743/oauth2/v2.0/token","user_agent.original":"python-requests/2.32.5","microsoft.tenant.id":"badf1f56-284d-4dc5-ac59-0dd53900e743","gen_ai.conversation.id":"__PERSONAL_CHAT_ID__","microsoft.conversation.item.link":"http://localhost:56150/_connector","gen_ai.agent.id":"d6d31512-379f-4994-b901-c098dfd9293f","gen_ai.agent.name":"nikhilcagent0416 Agent User","gen_ai.agent.description":"agenticUser","microsoft.agent.user.email":"74ae7173-86f8-41b0-a237-c4c4822fb9bc","microsoft.channel.name":"msteams","user.id":"a92962f3-9ed4-4bcd-9ae0-ad0002b6ca76","user.name":"Alex Wilber","http.status_code":200},"events":null,"links":null,"status":{"code":"UNSET","message":""}},{"traceId":"dc5ec9ef5aa6b2177d0900271f8e261a","spanId":"fa567ed20c284e6f","parentSpanId":"25450ad8fc4d2495","name":"GET","kind":"CLIENT","startTimeUnixNano":1777234048861878900,"endTimeUnixNano":1777234049479831100,"attributes":{"http.method":"GET","http.url":"https://login.microsoftonline.com/badf1f56-284d-4dc5-ac59-0dd53900e743/v2.0/.well-known/openid-configuration","user_agent.original":"python-requests/2.32.5","microsoft.tenant.id":"badf1f56-284d-4dc5-ac59-0dd53900e743","gen_ai.conversation.id":"__PERSONAL_CHAT_ID__","microsoft.conversation.item.link":"http://localhost:56150/_connector","gen_ai.agent.id":"d6d31512-379f-4994-b901-c098dfd9293f","gen_ai.agent.name":"nikhilcagent0416 Agent User","gen_ai.agent.description":"agenticUser","microsoft.agent.user.email":"74ae7173-86f8-41b0-a237-c4c4822fb9bc","microsoft.channel.name":"msteams","user.id":"a92962f3-9ed4-4bcd-9ae0-ad0002b6ca76","user.name":"Alex Wilber","http.status_code":200},"events":null,"links":null,"status":{"code":"UNSET","message":""}},{"traceId":"dc5ec9ef5aa6b2177d0900271f8e261a","spanId":"8ff3a8cc44a5d3b3","parentSpanId":"25450ad8fc4d2495","name":"POST","kind":"CLIENT","startTimeUnixNano":1777234049483831100,"endTimeUnixNano":1777234049742176700,"attributes":{"http.method":"POST","http.url":"https://login.microsoftonline.com/badf1f56-284d-4dc5-ac59-0dd53900e743/oauth2/v2.0/token","user_agent.original":"python-requests/2.32.5","microsoft.tenant.id":"badf1f56-284d-4dc5-ac59-0dd53900e743","gen_ai.conversation.id":"__PERSONAL_CHAT_ID__","microsoft.conversation.item.link":"http://localhost:56150/_connector","gen_ai.agent.id":"d6d31512-379f-4994-b901-c098dfd9293f","gen_ai.agent.name":"nikhilcagent0416 Agent User","gen_ai.agent.description":"agenticUser","microsoft.agent.user.email":"74ae7173-86f8-41b0-a237-c4c4822fb9bc","microsoft.channel.name":"msteams","user.id":"a92962f3-9ed4-4bcd-9ae0-ad0002b6ca76","user.name":"Alex Wilber","http.status_code":200},"events":null,"links":null,"status":{"code":"UNSET","message":""}},{"traceId":"dc5ec9ef5aa6b2177d0900271f8e261a","spanId":"198dba018889e6b4","parentSpanId":"b81de9bafa4aa4b4","name":"GET","kind":"CLIENT","startTimeUnixNano":1777234049751176300,"endTimeUnixNano":1777234050363215500,"attributes":{"http.method":"GET","http.url":"https://login.microsoftonline.com/badf1f56-284d-4dc5-ac59-0dd53900e743/v2.0/.well-known/openid-configuration","user_agent.original":"python-requests/2.32.5","microsoft.tenant.id":"badf1f56-284d-4dc5-ac59-0dd53900e743","gen_ai.conversation.id":"__PERSONAL_CHAT_ID__","microsoft.conversation.item.link":"http://localhost:56150/_connector","gen_ai.agent.id":"d6d31512-379f-4994-b901-c098dfd9293f","gen_ai.agent.name":"nikhilcagent0416 Agent User","gen_ai.agent.description":"agenticUser","microsoft.agent.user.email":"74ae7173-86f8-41b0-a237-c4c4822fb9bc","microsoft.channel.name":"msteams","user.id":"a92962f3-9ed4-4bcd-9ae0-ad0002b6ca76","user.name":"Alex Wilber","http.status_code":200},"events":null,"links":null,"status":{"code":"UNSET","message":""}}]}]}]}'
 
Image

Activity

  1. rads-1996 commented on Apr 28, 2026

    @rads-1996
    Member

    Jianbiao Lu (@alexlu4250) This has been addressed. Please try out the latest version 0.1.0b1 and let us know if the issue persists.

  2. rads-1996 commented on Apr 29, 2026

    @rads-1996
    Member

    Fixed with the including the upstream changes for filtering out non-genai spans. #95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions