Skip to content

Ensure envDetector will override any conflicting resource attributes #53

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

Merged
merged 1 commit into from
Sep 12, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ import {
import { SEMRESATTRS_TELEMETRY_AUTO_VERSION } from '@opentelemetry/semantic-conventions';
import { AlwaysRecordSampler } from './always-record-sampler';
import { AttributePropagatingSpanProcessorBuilder } from './attribute-propagating-span-processor-builder';
import { AwsBatchUnsampledSpanProcessor } from './aws-batch-unsampled-span-processor';
import { AwsMetricAttributesSpanExporterBuilder } from './aws-metric-attributes-span-exporter-builder';
import { AwsSpanMetricsProcessorBuilder } from './aws-span-metrics-processor-builder';
import { OTLPUdpSpanExporter } from './otlp-udp-exporter';
import { AwsXRayRemoteSampler } from './sampler/aws-xray-remote-sampler';
// This file is generated via `npm run compile`
import { LIB_VERSION } from './version';
import { OTLPUdpSpanExporter } from './otlp-udp-exporter';
import { AwsBatchUnsampledSpanProcessor } from './aws-batch-unsampled-span-processor';

const APPLICATION_SIGNALS_ENABLED_CONFIG: string = 'OTEL_AWS_APPLICATION_SIGNALS_ENABLED';
const APPLICATION_SIGNALS_EXPORTER_ENDPOINT_CONFIG: string = 'OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT';
Expand Down Expand Up @@ -133,14 +133,16 @@ export class AwsOpentelemetryConfigurator {
* envDetectorSync is used as opposed to envDetector (async), so it is guaranteed that the
* resource is populated with configured OTEL_RESOURCE_ATTRIBUTES or OTEL_SERVICE_NAME env
* var values by the time that this class provides a configuration to the OTel SDK.
*
* envDetectorSync needs to be last so it can override any conflicting resource attributes.
*/
defaultDetectors = [
envDetectorSync,
processDetector,
hostDetector,
awsEc2Detector,
awsEcsDetector,
awsEksDetector,
envDetectorSync,
];
}

Expand Down
Loading