mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2024-12-04 09:43:23 +02:00
Fix Jaeger exporter agent port default value and docs (#2131)
* Fix Jaeger exporter agent port default value and docs * Update changelog * Revert example
This commit is contained in:
parent
b8561785c0
commit
fd7c327b55
@ -70,6 +70,7 @@ The `fromEnv` detector no longer throws an error when `OTEL_RESOURCE_ATTRIBUTES`
|
||||
- The OTel span status is correctly transformed into the OTLP status in the `go.opentelemetry.io/otel/exporters/otlp/otlptrace` package.
|
||||
This fix will by default set the status to `Unset` if it is not explicitly set to `Ok` or `Error`. (#2099 #2102)
|
||||
- The `Inject` method for the `"go.opentelemetry.io/otel/propagation".TraceContext` type no longer injects empty `tracestate` values. (#2108)
|
||||
- Use `6831` as default Jaeger agent port instead of `6832`. (#2131)
|
||||
|
||||
## [Experimental Metrics v0.22.0] - 2021-07-19
|
||||
|
||||
|
@ -18,7 +18,7 @@ See [../../example/jaeger](../../example/jaeger).
|
||||
|
||||
The exporter can be used to send spans to:
|
||||
|
||||
- Jaeger agent using `jaeger.thrift` over binary thrift protocol via
|
||||
- Jaeger agent using `jaeger.thrift` over compact thrift protocol via
|
||||
[`WithAgentEndpoint`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/jaeger#WithAgentEndpoint) option.
|
||||
- Jaeger collector using `jaeger.thrift` over HTTP via
|
||||
[`WithCollectorEndpoint`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/jaeger#WithCollectorEndpoint) option.
|
||||
@ -31,7 +31,7 @@ The following environment variables can be used
|
||||
| Environment variable | Option | Default value |
|
||||
| --------------------------------- | --------------------------------------------------------------------------------------------- | ----------------------------------- |
|
||||
| `OTEL_EXPORTER_JAEGER_AGENT_HOST` | [`WithAgentHost`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/jaeger#WithAgentHost) | `localhost` |
|
||||
| `OTEL_EXPORTER_JAEGER_AGENT_PORT` | [`WithAgentPort`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/jaeger#WithAgentPort) | |
|
||||
| `OTEL_EXPORTER_JAEGER_AGENT_PORT` | [`WithAgentPort`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/jaeger#WithAgentPort) | `6831` |
|
||||
| `OTEL_EXPORTER_JAEGER_ENDPOINT` | [`WithEndpoint`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/jaeger#WithEndpoint) | `http://localhost:14268/api/traces` |
|
||||
| `OTEL_EXPORTER_JAEGER_USER` | [`WithUsername`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/jaeger#WithUsername) | |
|
||||
| `OTEL_EXPORTER_JAEGER_PASSWORD` | [`WithPassword`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/jaeger#WithPassword) | |
|
||||
|
@ -24,7 +24,7 @@ const (
|
||||
// i.e. "localhost"
|
||||
envAgentHost = "OTEL_EXPORTER_JAEGER_AGENT_HOST"
|
||||
// Port for the Jaeger agent, part of address where exporter sends spans
|
||||
// i.e. 6832
|
||||
// i.e. 6831
|
||||
envAgentPort = "OTEL_EXPORTER_JAEGER_AGENT_PORT"
|
||||
// The HTTP endpoint for sending spans directly to a collector,
|
||||
// i.e. http://jaeger-collector:14268/api/traces.
|
||||
|
@ -45,8 +45,9 @@ func (fn endpointOptionFunc) newBatchUploader() (batchUploader, error) {
|
||||
return fn()
|
||||
}
|
||||
|
||||
// WithAgentEndpoint configures the Jaeger exporter to send spans to a jaeger-agent. This will
|
||||
// use the following environment variables for configuration if no explicit option is provided:
|
||||
// WithAgentEndpoint configures the Jaeger exporter to send spans to a Jaeger agent
|
||||
// over compact thrift protocol. This will use the following environment variables for
|
||||
// configuration if no explicit option is provided:
|
||||
//
|
||||
// - OTEL_EXPORTER_JAEGER_AGENT_HOST is used for the agent address host
|
||||
// - OTEL_EXPORTER_JAEGER_AGENT_PORT is used for the agent address port
|
||||
@ -59,7 +60,7 @@ func WithAgentEndpoint(options ...AgentEndpointOption) EndpointOption {
|
||||
agentClientUDPParams{
|
||||
AttemptReconnecting: true,
|
||||
Host: envOr(envAgentHost, "localhost"),
|
||||
Port: envOr(envAgentPort, "6832"),
|
||||
Port: envOr(envAgentPort, "6831"),
|
||||
},
|
||||
}
|
||||
for _, opt := range options {
|
||||
@ -102,7 +103,7 @@ func WithAgentHost(host string) AgentEndpointOption {
|
||||
// WithAgentPort sets a port to be used in the agent client endpoint.
|
||||
// This option overrides any value set for the
|
||||
// OTEL_EXPORTER_JAEGER_AGENT_PORT environment variable.
|
||||
// If this option is not passed and the env var is not set, "6832" will be used by default.
|
||||
// If this option is not passed and the env var is not set, "6831" will be used by default.
|
||||
func WithAgentPort(port string) AgentEndpointOption {
|
||||
return agentEndpointOptionFunc(func(o *agentEndpointConfig) {
|
||||
o.Port = port
|
||||
@ -137,7 +138,7 @@ func WithMaxPacketSize(size int) AgentEndpointOption {
|
||||
})
|
||||
}
|
||||
|
||||
// WithCollectorEndpoint defines the full url to the Jaeger HTTP Thrift collector. This will
|
||||
// WithCollectorEndpoint defines the full URL to the Jaeger HTTP Thrift collector. This will
|
||||
// use the following environment variables for configuration if no explicit option is provided:
|
||||
//
|
||||
// - OTEL_EXPORTER_JAEGER_ENDPOINT is the HTTP endpoint for sending spans directly to a collector.
|
||||
|
Loading…
Reference in New Issue
Block a user