-
Notifications
You must be signed in to change notification settings - Fork 760
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
Unify the enrichment API surface for Log/Metric/Trace #4371
Comments
What's the motivation for this change? |
And what's the value in BaseEnricher? What code would ever be written that would use such a type? |
I feel it should follow the conventions of dotnet and if interfaces are preferred we'll go that direction. OpenTelemetry typically builds on top of abstract base classes, where this was originally added. |
Currently, there's a scattered set of conceptually but otherwise unrelated interfaces for enrichment. The goal here would be to unify and standardize the enrichment layer so that developers can build on top of a consistent framework. |
@geeknoid this will also allow us to extend the functionality later on - even for older frameworks. Currently, the approach with having interface methods with default implementation is not supported on .NET FX. |
I understand the small incremental benefit of changing ITagCollector to be a base class. I did this for IRedactor a few months back to give us a Redactor base class instead. But what does having BaseEnricher as a base class do? Why is this useful? When would this type ever be used? When would there ever be something polymorphic in nature using BaseEnricher? |
@geeknoid, do you propose eliminating @dariusclay BTW why do we need |
Yes, just don't have BaseEnricher. The common base type is only useful if we expect multiple enricher objects for different kinds of enrichment to be used in a polymorphic way. |
OK, time is passed for this. We're locked in for .NET 8. |
Background and motivation
This would migrate the changes originally introduced on Otel-dotnet-contrib side into dotnet/extensions, changing from interfaces to an abstract
BaseEnricher
class.original proposal:
open-telemetry/opentelemetry-dotnet#4097
implementation:
open-telemetry/opentelemetry-dotnet-contrib#949
API Proposal
API Usage
Alternative Designs
No response
Risks
No response
The text was updated successfully, but these errors were encountered: