Observed behavior
Despite being suggested via the documentation:
https://flagd.dev/reference/monitoring/#custom-resource-attributes
You can't override all resource attributes.
At least, I've seen that service.name and service.version seem to be basically hard-coded in.
Expected Behavior
The service would follow the typical OTEL conventions, and allow these resource attributes to be overridden by environment variables.
I am running flagd as a sidecar to a service right now, and want to be able to distinguish that instance of flagd from others we'll be running in the future with different configurations.
Steps to reproduce
Run Flagd via docker-compose with a service like this, with an otel collector also running locally:
flagd:
image: ghcr.io/open-feature/flagd:v0.15.2
environment:
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector-contrib:4317
OTEL_EXPORTER_OTLP_PROTOCOL: grpc
OTEL_RESOURCE_ATTRIBUTES: deployment.environment.name=laptop2,service.name=flagd2,service.version=0.15.2-fake,service.namespace=pretend,fake.attribute=fakeness
command:
- 'start'
- '--uri'
- 'file:/flags/flagd.json'
- '--metrics-exporter'
- 'otel'
volumes:
- ./flagd.json:/flags/flagd.json
ports:
- "8013:8013"
All attributes there in OTEL_RESOURCE_ATTRIBUTES are respected, other than the service.name and service.version.
Observed behavior
Despite being suggested via the documentation:
https://flagd.dev/reference/monitoring/#custom-resource-attributes
You can't override all resource attributes.
At least, I've seen that
service.nameandservice.versionseem to be basically hard-coded in.Expected Behavior
The service would follow the typical OTEL conventions, and allow these resource attributes to be overridden by environment variables.
I am running
flagdas a sidecar to a service right now, and want to be able to distinguish that instance of flagd from others we'll be running in the future with different configurations.Steps to reproduce
Run Flagd via docker-compose with a service like this, with an otel collector also running locally:
All attributes there in
OTEL_RESOURCE_ATTRIBUTESare respected, other than theservice.nameandservice.version.