Skip to content

Ability to set duration on RecordDatastoreSegment #3258

@JscNZ

Description

@JscNZ

Is your feature request related to a problem? Please describe.

The transaction.RecordDatastoreSegment assumes that you can easily wrap the database operation being performed.

We're consuming an existing .net library that uses System.Diagnostic.ActivitySource which only has hooks for activity started and activity ended. The data access uses a factory method so wrapping the whole thing would include more than the raw data store timings.

Feature Description

The ability to record a custom datastore segment with a specified duration. We can use the System.Diagnostic.Activity duration property to pass in giving us insights into how long these un-instrumented calls are taking.

Describe Alternatives

We've attempted to use a scoped service and call RecordDatastoreSegment in the ActivityStarted action and later call dispose in the ActivityStopped action but these aren't a true representation of the duration for performing the data access.

Additional context

Add any other context here.

Priority

Please help us better understand this feature request by choosing a priority from the following options:
Nice to Have

Metadata

Metadata

Assignees

No one assigned

    Labels

    communityTo tag external issues and PRsfeature requestTo tag an issue after triage that is a feature instead of TD

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions