Skip to content
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

Disable prometheus normalization featuregate #559

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ As a downstream Repo of [opentelemetry-lambda](https://github.com/open-telemetry
- Java-Agent layer [**aws-otel-java-agent-<amd64|arm64>-ver-1-24-0**](https://aws-otel.github.io/docs/getting-started/lambda/lambda-java-auto-instr) contains AWS Distro for OpenTelemetry Java Instrumentation `v1.24.0` and ADOT Collector for Lambda `v0.28.0`
- Collector layer **aws-otel-collector-<amd64|arm64>-ver-0-74-0** contains ADOT Collector for Lambda `v0.28.0`. Compatible with [.NET](https://aws-otel.github.io/docs/getting-started/lambda/lambda-dotnet) and [Go](https://aws-otel.github.io/docs/getting-started/lambda/lambda-go) runtimes.

## Notice: ADOT Collector v0.31.0 Breaking Change
Users of the `prometheusremotewrite` exporter please reference GitHub Issue [Warning: ADOT Collector v0.31.0 breaking change](https://github.com/aws-observability/aws-otel-collector/issues/2043)
for information on an upcoming breaking change.

## Sample Apps
We provide [SAM and Terraform sample applications](sample-apps/) for AWS managed OpenTelemetry Lambda layers. You can play with these samples by the following:
1. Install AWS Cli, AWS SAM, Terraform, and configure AWS credentials correctly.
Expand Down
11 changes: 11 additions & 0 deletions adot/collector/lambdacomponents/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ package lambdacomponents
//github.com/aws-observability/aws-otel-lambda/adot/collector/lambdacomponents

import (
"log"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter"
Expand All @@ -27,6 +29,7 @@ import (
"go.opentelemetry.io/collector/exporter/otlpexporter"
"go.opentelemetry.io/collector/exporter/otlphttpexporter"
"go.opentelemetry.io/collector/extension"
"go.opentelemetry.io/collector/featuregate"
"go.opentelemetry.io/collector/otelcol"
"go.opentelemetry.io/collector/receiver"
"go.opentelemetry.io/collector/receiver/otlpreceiver"
Expand Down Expand Up @@ -73,5 +76,13 @@ func Components() (
Exporters: exporters,
}

// TODO: remove after ADOT Collector v0.30.0 is released
if err := featuregate.GlobalRegistry().Set("pkg.translator.prometheus.NormalizeName", false); err != nil {
return otelcol.Factories{}, err
}
log.Printf("attn: users of the prometheusremotewrite exporter please refer to " +
"https://github.com/aws-observability/aws-otel-collector/issues/2043 in regards to an ADOT Collector v0.31.0 " +
"breaking change")

return factories, errs
}