Closed vroldanbet closed 2 years ago
Let's double check there isn't a way to do this with environment variables first.
Closing - you can achieve this by using OTELs OTEL_EXPORTER_OTLP_ENDPOINT
env var like http://localhost:4318
. Otel library calls WithInsecure
if http
is set.
@jzelinskie I've reopened this. Even though it's possible to enable insecure communication via OTEL environment variables, it's not immediately obvious to users of applications using cobrautil
. For example SpiceDB offers --help
flag with all options, including those related to OTEL provided by cobrautil
. It would be a better UX - we cannot expect folks to go and check the opentelemetry go library source code to figure out they can achieve it with OTEL_EXPORTER_OTLP_ENDPOINT
.
Until it's decided to deprecate cobrautil/otel flags in favour of OTEL's native envs, we should provide a cohesive interface in cobrautil.
I think that's reasonable, is there an equivalent for Jaeger though? Because the cobrautil flag is not tied to a particular provider, ideally it can also trigger the behavior for Jaeger.
@jzelinskie
I think that's reasonable, is there an equivalent for Jaeger though? Because the cobrautil flag is not tied to a particular provider, ideally it can also trigger the behavior for Jaeger.
in Jaeger the endpoint must have the protocol as prefix, so it's defined through that. Nothing in the API showed the equivalent, but I can dig a bit more
EDIT: I couldn't wind any equivalent in the otel Jaeger exporter. It would seem to be delegated to the http.Client
, which figures out based on the endpoint URL
closes https://github.com/jzelinskie/cobrautil/issues/13
this is particularly useful in development environments so that folks don't have to setup TLS in their collector