elasticexporter: don't return error on invalid tags #285
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
If an
http.url
attribute is provided, and does not conform to theopentelemetry conventions, do not return an error if URL parsing fails.
Instead, just record the value as-is in a label.
For example, the OpenTracing instrumentation for Go's net/http client sends host:port in some cases: https://github.com/opentracing-contrib/go-stdlib/blob/cf7a6c988dc994e945d2715565026f3cc8718689/nethttp/client.go#L255
Testing:
Tested manually with Jaeger HotR.O.D. -> OpenTelemetry Collector -> Elastic APM
(This is how we found the issue in the first place.)
Added unit tests.