Skip to content

Add Instrumentation #82

@samritchie

Description

@samritchie

metricsCollector was added to TableContext approx three years ago as a stop-gap for plugging observability features into Dynamo. Since then the dotnet observability story has solidified around OpenTelemetry exposed via Systems.Diagnostics counters/activities.

There is beta AWS SDK instrumentation available in OpenTelemetry.Instrumentation.AWS, however this appears to be fairly limited to the outer API calls rather than anything dynamo-specific.

I’m suggesting deprecating the metricsCollector param and adding System.Diagnostics instrumentation to this library directly. There are recommended attributes published at https://opentelemetry.io/docs/specs/semconv/database/dynamodb/. A few questions for discussion:

  • Should this include logging, metrics, traces or all three? I don’t think anyone’s missed library-level logging so far, but it may end up being useful for streams
  • Should the recommended attributes be implemented verbatim or should it just implement the essentials to start with
  • Conventionally libraries publish a separate package with a (very basic) hosting extension to enable metrics/traces on the application host. I’m unsure whether this is really necessary, or even how many consuming applications use Host builders

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions