Hi guys ! I want to understand how can I add info...
# support
g
Hi guys ! I want to understand how can I add information on my filelog receivers for deployment.environment or service.name. I read the OTel doc and I don't understand where do I have to put this on conf file. My goa is to use the quick filter on the log panel for exemple where i can chose DEV/PROD or SERVICE1/SERVICE2
s
You need a comma delimited environment variable OTEL_RESOURCE_ATTRIBUTES=deployment.environment=MyEnvironmentName
you could do service.name in that environment variable, but since that shouldn't change per environment, I'd leave that to the app configuration.
Since the OTEL documentation changed past when signoz implemented their consumer, I do this: OTEL_RESOURCE_ATTRIBUTES=deployment.environment=MyEnvironmentName,deployment.environment.name=MyEnvironmentName
here are all the different environment variables that OTEL supports. https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
g
Thank you. I find a way to set it up from the Otel conf file. Easier for me because the service.name can be different. in processors i did
Copy code
resource/space:
  attributes:
    - key: deployment.environment
      value: "DEV"
      action: upsert
    - key: service.name
      value: "SPACE"
      action: upsert