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

Set environment variables without injection #990

Closed
bilbof opened this issue Jul 19, 2022 · 2 comments · Fixed by #1000
Closed

Set environment variables without injection #990

bilbof opened this issue Jul 19, 2022 · 2 comments · Fixed by #1000
Labels
area:auto-instrumentation Issues for auto-instrumentation

Comments

@bilbof
Copy link
Contributor

bilbof commented Jul 19, 2022

Hey folks, it would be nice for the Instrumentation CRD to support adding OTEL environment variables to a Pod without injecting the init container / updating libraries and modifying env vars such as NODE_OPTIONS.

My use case is that I have many services written in Go, Rust, C++, etc. which aren't supported by the Instrumentation CRD but which I'd like to configure in the same way.

I could re-use the autoinstrumentation for another language like using an annotation instrumentation.../language-python: "true" on a Rust application PodSpec, but that feels a bit wrong, and I would expect this not to be supported.

Is there a way to set the generated OTEL environment variables on Pods which aren't using a supported language?

@pavolloffay pavolloffay added the area:auto-instrumentation Issues for auto-instrumentation label Jul 20, 2022
@pavolloffay
Copy link
Member

This use-case has been discussed in the past, but I cannot find the ticket/PR.

I think it makes sense to inject just the SDK config. It could be supported by:

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

It would inject only core SDK env vars like the exporter, sampler, propagation, resource attributes. https://github.com/open-telemetry/opentelemetry-operator/blob/main/pkg/instrumentation/sdk.go#L100

bilbof added a commit to bilbof/opentelemetry-operator that referenced this issue Jul 23, 2022
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 added a commit to bilbof/opentelemetry-operator that referenced this issue Jul 23, 2022
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 added a commit to bilbof/opentelemetry-operator that referenced this issue Jul 23, 2022
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 added a commit to bilbof/opentelemetry-operator that referenced this issue Jul 23, 2022
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 23, 2022

@pavolloffay I've added a PR for this at #1000

bilbof added a commit to bilbof/opentelemetry-operator that referenced this issue Jul 25, 2022
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 added a commit to bilbof/opentelemetry-operator that referenced this issue Jul 25, 2022
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 added a commit to bilbof/opentelemetry-operator that referenced this issue Jul 25, 2022
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 added a commit to bilbof/opentelemetry-operator that referenced this issue Jul 26, 2022
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 added a commit to bilbof/opentelemetry-operator that referenced this issue Jul 26, 2022
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"
```
pavolloffay pushed a commit that referenced this issue Jul 27, 2022
Closes #990.

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

Usage:

```bash
instrumentation.opentelemetry.io/inject-sdk: "true"
```
ItielOlenick pushed a commit to ItielOlenick/opentelemetry-operator that referenced this issue 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
area:auto-instrumentation Issues for auto-instrumentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants