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.
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
Split out OTLP gRPC vs. HTTP endpoint configuration #1729
Split out OTLP gRPC vs. HTTP endpoint configuration #1729
Changes from 1 commit
1f4b672
927f066
cb5d942
e3b5752
08b9cea
6d9287d
ecabd55
3ca03ae
0abb3f2
adc812c
3e0c5ec
6ffff19
3fed1f1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Does this mean SDKs all have to support this variable? I'd prefer not to support it - we already have a method for picking secure / insecure in the endpoint scheme, having another way of doing the same thing is extra documentation / support overhead (not to mention bringing back this problematic word
insecure
which security scanners don't like much). If the idea is to allow either (no-scheme url + insecure flag) or (scheme url) than that's ok but don't see that mentioned in this wording.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.
Another point is that it's always been quite mysterious when
host:port
defaults to TLS - I don't think that matches most users' expectations, it's just a security push by us I think. The schemed URLs solved this problem nicely, if allowing non-schemed URLs I really recommend the default being insecure, I think it matches most users' expectations (evencurl google.com
will hit HTTP, not HTTPS, this is what people think IMO).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.
Yes, my thought was that SDKs and collector would support the
insecure
setting.I agree supporting it is not a thrilling idea. Coming from .NET, the client we're using for the OTLP exporter requires a scheme anyways. Though my understanding is that quite a few gRPC client libraries for other languages support declaring an endpoint without a scheme and that they default to using the
dns
scheme and a secure channel is the default.The
insecure
wording seems to be inspired by gRPC libraries themselves - here are some examples for setting up an insecure channel in various languages.This is the idea. I attempted to capture that with my wording:
endpoint
."I'm not an expert, though I'm not entirely certain that it was just a security push on the part of OpenTelemetry. My read of the examples I linked to above seems to suggest that secure channels are considered the default by most gRPC libraries.
All this said, I had also hoped that scheme alone could solve this issue, but it seems that declaring a URI without a scheme is common with many libraries. In speaking with the collector SIG they would like to maintain the ability to configure without a scheme. Go SDK also still supports the
insecure
config setting.So I guess it's a question of how important it is we drive consistency across the language SDKs. The inconsistency has been a point of confusion to some.
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.
Do they want to configure without scheme but still use TLS?
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.
I'm not sure if it's required for collector and SDK to be consistent here as I think these variables are mostly for SDK.
SDKs will always have extra knobs compared to what's in the spec. Usually they're language specific but it doesn't seem terrible if one SDK supports
insecure
flag if they want to. For Java though we've had no user issues related to this flag and it seems to work well, so I'm thinking don't fix what isn't broken. I can't see any chance of improvement by requiring support of the new flag but a chance of more user confusion when having multiple flags.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.
Correct, TLS is the default in Go.
Go looks something like this
On the other hand, Go does support a scheme when configuration is done via the
OTEL_EXPORTER_OTLP_ENDPOINT
environment variable. The schemehttp
implies theWithInsecure
option.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.
This stance seems reasonable.
Perhaps at a minimum do you think it makes sense to say for OTLP/gRPC:
https
indicates use TLS.insecure
configuration is required.First point effectively maintains status quo. Second point enables the flexibility for SDKs and requires a level of consistency when adopting this.
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.
Yup I have no problem with text related to an
insecure
flag if it's optional.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.
I've clarified things so that implementing the
insecure
flag is optional if the SDK does not allow for an endpoint to be configured without a scheme.