-
Notifications
You must be signed in to change notification settings - Fork 193
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
Add DsnParser + Otlp/HttpEndpointResolver and remove dependency on nyholm/dsn #767
Conversation
Codecov Report
@@ Coverage Diff @@
## main #767 +/- ##
============================================
+ Coverage 78.66% 79.53% +0.86%
- Complexity 1348 1409 +61
============================================
Files 156 160 +4
Lines 3314 3479 +165
============================================
+ Hits 2607 2767 +160
- Misses 707 712 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Phan error should be resolved, when #768 is merged. |
enqueue/dsn supports scheme extensions / their use case is very similar to ours. I think we should use ConnectionFactoryFactory as orientation for our implementation. |
This reverts commit 2b3f167.
looks good to me, pending Nevay's comment about enqueue/dsn ? |
I guess you mean the ExporterFactory. I can look into that. |
This PR removes the dependency on the nyholm/dsn package by introducing dedicated DsnParser + Otlp/HttpEndpointResolver components.
The DSN we use in the Trace/ExporterFactory (and probably other factories in the future) uses a
protocol=type+scheme
pattern to identify different exporters. This is not supported by nyholm/dsn, so there had to be custom logic in the first place.The other place where the package was used was resolving the OTLP HTTP endpoints according to the spec. This logic has been used into a dedicated class, which can be used for exporters of other signals in the future.
(Note: There were some outdated assumptions in the OTLPHttpExporterTest which dated back to before the introduction of signal specific Env Vars. These have just been removed for now. The OTLExporter tests need some rework anyway, which will be provided in a future PR.)
related: