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

Enable instrumentation injecting only core SDK config #1000

Merged
merged 1 commit into from
Jul 27, 2022

Conversation

bilbof
Copy link
Contributor

@bilbof bilbof commented Jul 23, 2022

Closes #990.

Adds support for injecting SDK environment variables only,
without injecting language-specific libraries or config.

Usage:

instrumentation.opentelemetry.io/inject-sdk: "true"

@bilbof bilbof requested a review from a team July 23, 2022 17:36
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 23, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: bilbof / name: Bill Franklin (229b0be)

README.md Outdated
You can configure the OpenTelemetry SDK for applications which can't
currently be autoinstrumented by using `inject-sdk` in place of (e.g.)
`inject-python` or `inject-java`. This will inject environment variables
like `OTEL_RESOURCE_ATTRIBUTES` but will not actually provide the SDK via an
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

via an init container

This is an implementation detail and it will not be true for e.g. Golang instrumentation. therefore it should not be mentioned here.

name: sdk-only
spec:
env:
- name: OTEL_TRACES_EXPORTER
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to remove all this OTEL env vars rely on the env vars derived from the spec.

@pavolloffay pavolloffay changed the title [feature] Enable injecting only core SDK config Enable instrumentation injecting only core SDK config Jul 25, 2022
@bilbof bilbof force-pushed the main branch 3 times, most recently from ce9eb98 to 8cf48ac Compare July 25, 2022 20:55
@bilbof
Copy link
Contributor Author

bilbof commented Jul 25, 2022

@pavolloffay thanks for your feedback, I've amended the commit

Copy link
Member

@pavolloffay pavolloffay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. just some nits around docs

README.md Outdated
Follow the instructions in the Dockerfiles on how to build a custom container image.

#### Inject OpenTelemetry SDK environment variables only

You can configure the OpenTelemetry SDK for applications which can't
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit we don't use line breaks in the readme.

README.md Outdated

You can configure the OpenTelemetry SDK for applications which can't
currently be autoinstrumented by using `inject-sdk` in place of (e.g.)
`inject-python` or `inject-java`. This will inject environment variables
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mention as well reporter and sampling config.

Closes open-telemetry#990.

Adds support for injecting SDK environment variables only,
without injecting language-specific libraries or config.

Usage:

```bash
instrumentation.opentelemetry.io/inject-sdk: "true"
```
@bilbof
Copy link
Contributor Author

bilbof commented Jul 26, 2022

@pavolloffay thanks for reviewing. I've updated the readme and rebased.

@pavolloffay pavolloffay merged commit 03af42e into open-telemetry:main Jul 27, 2022
ItielOlenick pushed a commit to ItielOlenick/opentelemetry-operator that referenced this pull request May 1, 2024
…#1000)

Closes open-telemetry#990.

Adds support for injecting SDK environment variables only,
without injecting language-specific libraries or config.

Usage:

```bash
instrumentation.opentelemetry.io/inject-sdk: "true"
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set environment variables without injection
2 participants