-
Notifications
You must be signed in to change notification settings - Fork 782
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
Remove the peer service resolver logic from zipkin exporter #6018
Comments
Hey! @rajkumar-rangaraj @CodeBlanch |
@devc007, it is an exporter. The only goal of this module/library is to just take provided data and pack it in the given format. Any data-modification should be done on the instrumentation libraries side. |
@Kielek Thank you so much for your reply! I was waiting for this. Right now, I am just trying to solve an issue in a different organization. I will look at this again later. Sorry, I forgot the whole context, so I need to read through this issue again. |
Hey! @Kielek and @rajkumar-rangaraj , I’d like to take on this issue. Would it be okay if I work on it? |
@CodingwithKetan, it will be great, looking for PR :- ) |
Hey! @Kielek and @rajkumar-rangaraj, However, I have a different viewpoint that I’d like to discuss. The PeerServiceResolver is primarily responsible for parsing and extracting peer service data (e.g., IP address, hostname), similar to how we extract other data like StatusCode and status description in the ZipkinActivityConversionExtensions class. In scenarios where the activity had kind as client or producer, we need to create an instance of RemoteEndpoint, and for that, we require information such as net.peer.name, net.peer.port, net.peer.ip, and peer.service. Additionally, managing priority for the peer name while creating the RemoteEndpoint is also crucial. I understand that this can be achieved using the following code:
However, I feel this might not be the most optimal approach. For example, if in the future a new exporter (e.g., "xyz") is introduced, and we need similar (not exactly but we need remote ip and port ) logic for handling remote endpoint-related information, this would result in code duplication. I'd like to avoid repeating this logic across multiple places. Please let me know if I’m missing something, or if there’s a better way to handle this while adhering to the goal of keeping the exporter focused on formatting and packing data rather than modifying it. Looking forward to your insights! |
Calculating Adding new tags during the exporting phase is not. I do not think that code duplication should be considered here. Specification affects Zipkin exporter only. When the new exporter occurs (I doubt, as OTLP is recommended way) we can refactor the code. |
Package: OpenTelemetry.Exporter.Zipkin
More Information: https://github.com/open-telemetry/opentelemetry-dotnet/pull/6015/files#r1878832826
The text was updated successfully, but these errors were encountered: