-
Notifications
You must be signed in to change notification settings - Fork 15
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
Refactor OpenTelemetryData to Action<Activity> #143
Conversation
This allows consumers such as ingest to record the actual number of operations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More flexible 👍 lgtm.
if (attribute.Key.Equals(OpenTelemetryAttributes.DbElasticsearchSchemaUrl, StringComparison.Ordinal)) | ||
{ | ||
if (attribute.Value is string schemaVersion) | ||
productSchemaVersion = schemaVersion; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stevejgordon Removing this causes the condition in line 69 to be always true
.
/// <summary> | ||
/// The name to use for spans relating to a request. | ||
/// </summary> | ||
public string? SpanName { get; init; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stevejgordon How am I supposed to set a custom OperationName
with the new design? The property has no setter. Should I use DisplayName
to modify it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: DisplayName
does not update the original OperationName
which causes a test to fail in the client library. We have to re-introduce a way to provide the OperationName
.
A potential solution would be to bring back OpenTelemetryData
, but modify it to, besides OperationName
, have the current Action<>
as a property instead of the previous "attributes" dictionary.
Closes #142