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

Investigation/POC Kubernetes (K8s) Zero-code Instrumentation #97

Open
SergeyKleyman opened this issue Sep 16, 2024 · 0 comments
Open

Investigation/POC Kubernetes (K8s) Zero-code Instrumentation #97

SergeyKleyman opened this issue Sep 16, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@SergeyKleyman
Copy link
Contributor

SergeyKleyman commented Sep 16, 2024

Implementation progress

Done

Verify that approach based on setting environment variables and mounted volume indeed works

Use the approach described at open-telemetry/opentelemetry-php#932 (comment) based on PHP_INI_SCAN_DIR environment variable to inject EDOT for PHP

Test it on applications
- CLI
- PHP-FPM
- Apache + mod_php

Verify the POC on Elastic APM Attacher

It's simpler to verify that the approach based on setting environment variables and mounted volume indeed works in k8s setup using our Elastic APM k8s Attacher instead of OpenTelemtry K8x operator because Elastic APM k8s Attacher is much easier to setup and make temporary changes just for this POC.

By following instructions at https://www.elastic.co/guide/en/apm/attacher/current/apm-attacher.html

  • Add support for injecting EDOT PHP using PHP_INI_SCAN_DIR environment variable to Elastic APM K8s Attacher
  • Install modified Elastic APM K8s Attacher
  • Verify that EDOT PHP automatically instruments test application and sends data to the backend

In progress

Extended implementation to OpenTelemetry Operator for Kubernetes

Follow steps at https://github.com/open-telemetry/opentelemetry-operator/blob/main/CONTRIBUTING.md#deployment-with-webhooks
I am currently at the step "Using a private container registry" to deploy container with EDOT PHP files that updated OTel k8s operator can pull and inject into application container.

Extended implementation to vanilla OTel PHP distribution using auto_prepend_file similar to

WordPress instrumentation's approach

Contribute implementation upstream

Opened PR at https://github.com/open-telemetry/opentelemetry-operator/
open-telemetry/opentelemetry-operator#3331

TODO

Publish docker image with EDOT that can be used with OTel K8s operator

Update Elastic docs

On how to monitor PHP applications using OpenTelemetry Operator for Kubernetes + PHP

Update instructions shipped with Kibana

On how to monitor PHP applications using OpenTelemetry Operator for Kubernetes + PHP

@SergeyKleyman SergeyKleyman added the enhancement New feature or request label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant