Skip to content

Commit

Permalink
Merge branch 'main' into feat/func-over-const-resources
Browse files Browse the repository at this point in the history
  • Loading branch information
pichlermarc authored Feb 13, 2025
2 parents 5fb4788 + 3c65b56 commit 790bc9c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/survey-on-merged-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- name: Add comment to PR if author is not a member
if: env.MEMBER_FOUND == 'false'
run: |
gh pr comment ${PR_NUM} --repo open-telemetry/opentelemetry.io --body "Thank you for your contribution @${USERNAME}! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this [survey](${SURVEY_URL})."
USERNAME=$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH")
gh pr comment ${PR_NUM} --repo open-telemetry/opentelemetry-js --body "Thank you for your contribution @${USERNAME}! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this [survey](${SURVEY_URL})."
env:
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se
* `WebTracerProvider` constructor now does not throw anymore when `contextManager` or `propagator` are passed as extra options to the constructor
* feat(sdk-trace-base): add stack trace warning to debug instrumentation [#5363](https://github.com/open-telemetry/opentelemetry-js/pull/5363) @neilfordyce
* feat(core): add more scalable replacements for getEnv(), getEnvWithoutDefaults() [#5443](https://github.com/open-telemetry/opentelemetry-js/pull/5443) @pichlermarc
* refactor(exporter-jaeger): migrate away from getEnv() [#5464](https://github.com/open-telemetry/opentelemetry-js/pull/5464) @pichlermarc

### :bug: (Bug Fix)

Expand Down
21 changes: 14 additions & 7 deletions packages/opentelemetry-exporter-jaeger/src/jaeger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import {
BindOnceFuture,
ExportResult,
ExportResultCode,
getEnv,
getNumberFromEnv,
getStringFromEnv,
} from '@opentelemetry/core';
import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';
import { Socket } from 'dgram';
Expand Down Expand Up @@ -60,15 +61,21 @@ export class JaegerExporter implements SpanExporter {
// to the endpoint via HTTP, making the OTEL_EXPORTER_JAEGER_AGENT_HOST and JAEGER_AGENT_PORT unused. If OTEL_EXPORTER_JAEGER_ENDPOINT is secured,
// HTTP basic authentication can be performed by setting the OTEL_EXPORTER_JAEGER_USER and OTEL_EXPORTER_JAEGER_PASSWORD environment variables.

const env = getEnv();
localConfig.endpoint =
localConfig.endpoint || env.OTEL_EXPORTER_JAEGER_ENDPOINT;
localConfig.endpoint ||
(getStringFromEnv('OTEL_EXPORTER_JAEGER_ENDPOINT') ?? '');
localConfig.username =
localConfig.username || env.OTEL_EXPORTER_JAEGER_USER;
localConfig.username ||
(getStringFromEnv('OTEL_EXPORTER_JAEGER_USER') ?? '');
localConfig.password =
localConfig.password || env.OTEL_EXPORTER_JAEGER_PASSWORD;
localConfig.host = localConfig.host || env.OTEL_EXPORTER_JAEGER_AGENT_HOST;
localConfig.port = localConfig.port || env.OTEL_EXPORTER_JAEGER_AGENT_PORT;
localConfig.password ||
(getStringFromEnv('OTEL_EXPORTER_JAEGER_PASSWORD') ?? '');
localConfig.host =
localConfig.host ||
(getStringFromEnv('OTEL_EXPORTER_JAEGER_AGENT_HOST') ?? '');
localConfig.port =
localConfig.port ||
(getNumberFromEnv('OTEL_EXPORTER_JAEGER_AGENT_PORT') ?? 6832);

this._localConfig = localConfig;

Expand Down

0 comments on commit 790bc9c

Please sign in to comment.