open-telemetry / opentelemetry.io

The OpenTelemetry website and documentation
https://opentelemetry.io
Creative Commons Attribution 4.0 International
528 stars 1.14k forks source link

Explain how to change the collector in documentation #4611

Closed RichardJECooke closed 2 months ago

RichardJECooke commented 4 months ago

Describe the bug

On this page, https://github.com/open-telemetry/opentelemetry-java-instrumentation?tab=readme-ov-file, you say "By default, the OpenTelemetry Java agent uses OTLP exporter configured to send data to OpenTelemetry collector at http://localhost:4317." and you link three times to the Java documentation at https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config.

But nowhere on that page does it mention how to change the collector or port 4317.

1) How do we change it? 2) Please add this to the readme file and the documentation.

RichardJECooke commented 4 months ago

Actually how to change 4317 isn't mentioned on the entire site:

https://opentelemetry.io/search/?q=4317

trask commented 4 months ago

hi @RichardJECooke!

are you looking for how to change the OTLP port that the Java agent sends data to?

or are you looking for how to change the OTLP port that the collector listens on?

RichardJECooke commented 4 months ago

The first one. This documentation I linked to is about starting the Java OpenTelemetry agent.

trask commented 4 months ago

transferring this to the doc repo to see if we can make this easier to find

in the meantime, I believe this is the doc you're looking for: https://opentelemetry.io/docs/languages/java/configuration/#otlp-exporter-span-metric-and-log-exporters

cartermp commented 4 months ago

What @trask mentions is correct, that is the Java-specific table for how to change the endpoint for export.

We do technically link to that page here: https://opentelemetry.io/docs/zero-code/java/agent/configuration/#sdk-autoconfiguration

However it's easy to see how it might get lost. One thing we could do is copy over some of the table into this page, or create a header related to exporter configuration and link to the table in the other page. Would that work @RichardJECooke?

RichardJECooke commented 3 months ago

Thanks.

  1. This page is good! https://opentelemetry.io/docs/languages/java/configuration You need to link to that in the readme. The zero code link you have isn't helpful (and it's silly to link to it twice).
  2. Search works today for 4317. Yesterday it was returning blank results on your site. Weird.
  3. It would be great to mention on the configuration page that the "endpoint" value is an endpoint to a collector. "Collector" isn't mentioned once on that page, though it's a core concept in OpenTelemetry. I was wondering "endpoint to what? what i'm monitoring?"
jaydeluca commented 2 months ago

The documentation has now been updated and a link has been added to the instrumentation repo readme pointing at the configuration page

svrnm commented 2 months ago

Thanks @jaydeluca, sounds like this issue can be closed.

@RichardJECooke if you think your issue has not been addressed by the recent changes, please go ahead and reopen or raise a new issue, thank you once again for bringing this to our attention