1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-09-16 09:26:25 +02:00

Fix default Jaeger collector endpoint (#1898)

* Fix default Jeager collector endpoint

* Update CHANGELOG.md
This commit is contained in:
Robert Pająk
2021-05-12 03:20:16 +02:00
committed by GitHub
parent 1e3fa3a3e0
commit cabf0c0782
3 changed files with 5 additions and 4 deletions

View File

@@ -61,6 +61,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Only report errors from the `"go.opentelemetry.io/otel/sdk/resource".Environment` function when they are not `nil`. (#1850, #1851)
- The `Shutdown` method of the simple `SpanProcessor` in the `go.opentelemetry.io/otel/sdk/trace` package now honors the context deadline or cancellation. (#1616, #1856)
- BatchSpanProcessor now drops span batches that failed to be exported. (#1860)
- Use `http://localhost:14268/api/traces` as default Jaeger collector endpoint instead of `http://localhost:14250`. (#1898)
### Security

View File

@@ -26,7 +26,7 @@ import (
func TestNewRawExporterWithDefault(t *testing.T) {
const (
collectorEndpoint = "http://localhost:14250"
collectorEndpoint = "http://localhost:14268/api/traces"
username = ""
password = ""
)

View File

@@ -129,12 +129,12 @@ func WithMaxPacketSize(size int) AgentEndpointOption {
// - OTEL_EXPORTER_JAEGER_PASSWORD is the password to be sent as authentication to the collector endpoint.
//
// The passed options will take precedence over any environment variables.
// If neither values are provided for the endpoint, the default value of "http://localhost:14250" will be used.
// If neither values are provided for the endpoint, the default value of "http://localhost:14268/api/traces" will be used.
// If neither values are provided for the username or the password, they will not be set since there is no default.
func WithCollectorEndpoint(options ...CollectorEndpointOption) EndpointOption {
return func() (batchUploader, error) {
o := &CollectorEndpointOptions{
endpoint: envOr(envEndpoint, "http://localhost:14250"),
endpoint: envOr(envEndpoint, "http://localhost:14268/api/traces"),
username: envOr(envUser, ""),
password: envOr(envPassword, ""),
httpClient: http.DefaultClient,
@@ -173,7 +173,7 @@ type CollectorEndpointOptions struct {
// This option overrides any value set for the
// OTEL_EXPORTER_JAEGER_ENDPOINT environment variable.
// If this option is not passed and the environment variable is not set,
// "http://localhost:14250" will be used by default.
// "http://localhost:14268/api/traces" will be used by default.
func WithEndpoint(endpoint string) CollectorEndpointOption {
return func(o *CollectorEndpointOptions) {
o.endpoint = endpoint