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

Sentry Exporter - Issues are not associated with the correct environment #35649

Open
HarryJRob opened this issue Oct 7, 2024 · 2 comments
Open

Comments

@HarryJRob
Copy link

HarryJRob commented Oct 7, 2024

Component(s)

exporter/sentry

What happened?

Description

Hi all, I am trying to connect a instance of Ory Kratos which produces telemetry in otel format to a self hosted sentry instance using a custom otel collector built using the otel collector builder v0.110.0.

The custom collector is using v0.110.0 of the sentryexporter.

Thank you for your time maintaining this code and any help you can provide!

Steps to Reproduce

  1. Run a collector using v0.110.0 of the sentryexporter
  2. Send a otel trace generated by Ory kratos to the collector. An example is given below
curl -X "POST" http://localhost:4318/v1/traces -H "Content-Type: application/json" -d @trace.json -i

trace.json
trace.json

  1. Observe that the collector does not associate the issue in sentry with the correct environment
    Sentry transaction is associated with the correct environment:
    image
    image

Issues as part of the transaction are not associated with the correct environment:
image

Expected Result

The issues in sentry are associated with the environment specified in the otel collector configuration

Actual Result

The issues in sentry are not associated with any environment

Collector version

v0.110.0

Environment information

Environment

OS: Alpine Linux
Compiler(if manually compiled): go 1.23.2

OpenTelemetry Collector configuration

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318

processors:
  batch:

exporters:
  debug:
    verbosity: detailed
  sentry:
    environment: "Development"
    dsn: <sentry-url>

extensions:
  health_check:
    endpoint: 0.0.0.0:13133
  pprof:
    endpoint: 0.0.0.0:55679
  zpages:
    endpoint: 0.0.0.0:1777

service:
  extensions: [health_check, pprof, zpages]
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [sentry]

Log output

None

Additional context

This might be an issue with how Ory is using the otel protocol but unfortunately I'm not experienced enough with tracing to know whether this is the case.

From what I've understood from the sentryexporters source code perhaps this line should also include a mapping of the environment from the sentryexporter config?

@HarryJRob HarryJRob added bug Something isn't working needs triage New item requiring triage labels Oct 7, 2024
Copy link
Contributor

github-actions bot commented Oct 7, 2024

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@atoulme
Copy link
Contributor

atoulme commented Dec 7, 2024

@AbhiPrasad please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants