Skip to content

Open Telemetry for EDDIE

This README should give a minimum running example on how to connect EDDIE to an open telemetry collector and connected services. The Grafana OTel LGTM Docker image is used as a preconfigured OpenTelemetry stack.

The /env/otel directory contains configurations to run the previously mentioned open telemetry services.

NOTE

For alert management set the variables in .env_grafana. It contains some defaults for E-Mail alerting, for other options see Grafana Alerting.

The following command starts the open telemetry services.

shell
docker compose up -d

To connect EDDIE to an OpenTelemetry connector, enable OpenTelemetry via the following properties and set the collector endpoint. For more information regarding configuring OpenTelemetry for EDDIE see the Spring Boot Starter. Setting logging.structured.format.console to ecs, gelf, or logstash enables structured logging in JSON format using the given format, for more information see Spring Boot Logging.

properties
otel.sdk.disabled=false
otel.resource.attributes.deployment.environment=dev
otel.resource.attributes.service.name=EDDIE
otel.resource.attributes.service.namespace=eddie.energy
otel.exporter.otlp.endpoint=http://localhost:4318
otel.exporter.otlp.protocol=http/protobuf
logging.structured.format.console=ecs
yaml
otel:
  sdk:
    disabled: false
  resource:
    attributes:
      deployment:
        environment: dev
      service:
        name: EDDIE
        namespace: eddie.energy
  exporter:
    otlp:
      endpoint: http://localhost:4318
      protocol: http/protobuf
logging:
  structured:
    format:
      console: ecs
dotenv
OTEL_SDK_DISABLED=false
OTEL_RESOURCE_ATTRIBUTES_DEPLOYMENT_ENVIRONMENT=dev
OTEL_RESOURCE_ATTRIBUTES_SERVICE_NAME=EDDIE
OTEL_RESOURCE_ATTRIBUTES_SERVICE_NAMESPACE=eddie.energy
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
LOGGING_STRUCTURED_FORMAT_CONSOLE=ecs

Alert Management

Alert management can be done out-of-the-box with Grafana, which allows alerting via E-Mail, Webhooks, Slack, etc. See Grafana Alerting.