Skip to content

Add Opentelemetry config and variables - #540

Open
ninetteadhikari wants to merge 1 commit into
aula-app:mainfrom
neighbourhoodie:opentelemetry
Open

Add Opentelemetry config and variables#540
ninetteadhikari wants to merge 1 commit into
aula-app:mainfrom
neighbourhoodie:opentelemetry

Conversation

@ninetteadhikari

Copy link
Copy Markdown

Context

This PR adds opentelemetry laravel to setup config file and variables. The backend is instrumented using the keepsuit/laravel-opentelemetry package together with the OpenTelemetry PHP extension. This automatically captured data for incoming HTTP requests, database queries, queue jobs, cache operations, and other framework activities.

This is required to provide data for Victoria Traces and is added to the infra repo. The traces data can be viewed on VictoraTraces here.

Checklist

  • Tested manually
  • GitHub issue linked
  • Changelist updated
  • Backward and forward compatible with aula-frontend/releases
  • Independent of the other BE version (v1 <-> v2)
  • Must be deployed ASAP (HOTFIX)
  • Needs update of docs.aula.de (repo)

Comment thread .env.example

# OpenTelemetry
OTEL_SERVICE_NAME=aula-backend
OTEL_TRACES_EXPORTER=otlp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
OTEL_TRACES_EXPORTER=otlp
OTEL_TRACES_EXPORTER=otlp
OTEL_METRICS_EXPORTER=null
OTEL_LOGS_EXPORTER=null

Comment thread config/opentelemetry.php
* This should be the key of one of the exporters defined in the exporters section
* Supported drivers: "otlp", "console", "memory", "null"
*/
'exporter' => env(Variables::OTEL_METRICS_EXPORTER, 'otlp'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
'exporter' => env(Variables::OTEL_METRICS_EXPORTER, 'otlp'),
'exporter' => env(Variables::OTEL_METRICS_EXPORTER, 'null'),

Comment thread config/opentelemetry.php
* This should be the key of one of the exporters defined in the exporters section
* Supported drivers: "otlp", "console", "memory", "null"
*/
'exporter' => env(Variables::OTEL_LOGS_EXPORTER, 'otlp'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
'exporter' => env(Variables::OTEL_LOGS_EXPORTER, 'otlp'),
'exporter' => env(Variables::OTEL_LOGS_EXPORTER, 'null'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we should either not use logs and metrics exporters in the PHP service or we should configure otel to accept them too (https://github.com/aula-app/infra/pull/44/changes#r3459359235)

@nikola-maric-aula nikola-maric-aula self-assigned this Jun 30, 2026
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.

2 participants