Skip to content

System.Diagnostics.Activity out of proc monitoring can't access Activity Events or Links #102924

Closed

Description

@CodeBlanch

We have DiagnosticSourceEventSource which enables listening to Activity \ traces out of process.

DiagnosticSourceEventSource supports an argument FilterAndPayloadSpecs which can be used to configure the events and payload which will be written to the source. Example:

[AS]MyActivitySource/Stop:-TraceId;SpanId;ParentSpanId;ActivityTraceFlags;Kind;DisplayName;StartTimeTicks=StartTimeUtc.Ticks;DurationTicks=Duration.Ticks;Status;StatusDescription;Tags=TagObjects.*Enumerate;ActivitySourceVersion=Source.Version

Tags=TagObjects.*Enumerate; works for retrieving tags.

But this...

Events=Events.*Enumerate;Links=Links.*Enumerate;

...won't work for retrieving Events and/or Links.

The reason it doesn't work is ActivityEvent and ActivityLink structs don't provide a suitable ToString implementation which is how the data gets serialized:

The solution could be to implement more useful ToString operations or provide some other way to include that data via the FilterAndPayloadSpecs. ToString could be tricky for ActivityEvent because it contains its own tag collection.

/cc @noahfalk @tarekgh @samsp-msft

Activity

  1. added
    untriaged
    on May 31, 2024
  2. dotnet-policy-service commented on May 31, 2024

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti
    See info in area-owners.md if you want to be subscribed.

  3. added this to the Future milestone on May 31, 2024
  4. added and removed
    untriaged
    on May 31, 2024
  5. dotnet-policy-service commented on May 31, 2024

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/area-system-diagnostics-activity
    See info in area-owners.md if you want to be subscribed.

  6. modified the milestones: Future, 10.0.0 on Oct 30, 2024
  7. added
    in-pr
    on Mar 25, 2025
  8. locked and limited conversation to collaborators on May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Diagnostics.Activityin-pr

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions