open-telemetry / open-telemetry/opentelemetry-php
Bring auto-instrumentation to OpenTelemetry K8s Operator
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 912
- Forks
- 232
- Avg merge
- 7d 16h
- Merged PRs (30d)
- 4
Description
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/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing language injection implementations in the autoinstrumentation directory and the instrumentation files under pkg/instrumentation, especially the proposed php.go location. Compare the existing automatic injection documentation and the Python Instrumentation example. Done means PHP auto-instrumentation can be configured through an Instrumentation resource and enabled on deployments with the PHP annotation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, php
- Domain
- devops, infrastructure, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100