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

Bring auto-instrumentation to OpenTelemetry K8s Operator #932

Open
svrnm opened this issue Mar 1, 2023 · 6 comments
Open

Bring auto-instrumentation to OpenTelemetry K8s Operator #932

svrnm opened this issue Mar 1, 2023 · 6 comments
Labels
pinned Will not be removed by stalebot

Comments

@svrnm
Copy link
Member

svrnm commented Mar 1, 2023

Is your feature request related to a problem?

With auto instrumentation for PHP being a thing, there is an opportunity to bring it to applications running in K8s clusters via the otel k8s operator automatically.

Describe the solution you'd like
Similar to other languages it would be great to be able to turn on injection of auto instrumentation for PHP, e.g. create an Instrumentation resource that configures the auto instrumentation (copied from python):

apiVersion: opentelemetry.io/v1alpha1
kind: Instrumentation
metadata:
  name: demo-instrumentation
spec:
  exporter:
    endpoint: http://demo-collector:4318
  propagators:
    - tracecontext
    - baggage
  python:
    env:
      - name: OTEL_PHP_...
        value: ...

and add an annotation to deployments:

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

This would require the creation of an init container, similar to the existing ones:

https://github.com/open-telemetry/opentelemetry-operator/tree/main/autoinstrumentation

and a instrumentationphp.go at

https://github.com/open-telemetry/opentelemetry-operator/tree/main/pkg/instrumentation

cc @open-telemetry/operator-approvers

Additional context
Existing injection for other languages: https://opentelemetry.io/docs/k8s-operator/automatic/

@frzifus
Copy link
Member

frzifus commented Mar 3, 2023

Sounds like a great idea. :) Do you want to move this issue to the Operator repo?

@svrnm
Copy link
Member Author

svrnm commented Mar 6, 2023

I raised it here because @bobstrecansky asked me so the PHP SIG can investigate & prioritize. Maybe both repos should have one issue and we link them?

@stale
Copy link

stale bot commented Jun 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale This issue didn't have recent activity label Jun 18, 2023
@stale
Copy link

stale bot commented Aug 12, 2023

This issue has been automatically closed because it has not had recent activity, but it can be reopened. Thank you for your contributions.

@stale stale bot closed this as completed Aug 12, 2023
@brettmc brettmc added pinned Will not be removed by stalebot and removed stale This issue didn't have recent activity labels Aug 13, 2023
@brettmc brettmc reopened this Aug 13, 2023
@cedricziel
Copy link
Contributor

I see value in injecting the extension, do you also want to inject the instrumentation code?

@svrnm
Copy link
Member Author

svrnm commented Nov 28, 2023

I see value in injecting the extension, do you also want to inject the instrumentation code?

What ever makes an application emit telemetry automatically, so yes, if it is possible to inject that as well safely (e.g. Node.js is doing it that way)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned Will not be removed by stalebot
Projects
None yet
Development

No branches or pull requests

4 participants