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

feat(spans): Reintroduce OTLP endpoint #4223

Merged
merged 17 commits into from
Nov 19, 2024
Merged

Conversation

jjbayer
Copy link
Member

@jjbayer jjbayer commented Nov 5, 2024

Restore the OTLP endpoint that was removed in #3973.

This PR moves the parsing of the trace data to the processor to ensure fast response times.

I also renamed the endpoint from /spans/ to /otlp/v1/traces/ to be consistent with https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/#otel_exporter_otlp_endpoint.

fixes: https://github.com/getsentry/team-ingest/issues/569

@jjbayer jjbayer marked this pull request as ready for review November 6, 2024 09:21
@jjbayer jjbayer requested a review from a team as a code owner November 6, 2024 09:21
@@ -74,6 +75,7 @@ pub fn routes(config: &Config) -> Router<ServiceState>{
.route("/api/:project_id/minidump/", minidump::route(config))
.route("/api/:project_id/events/:event_id/attachments/", post(attachments::handle))
.route("/api/:project_id/unreal/:sentry_key/", unreal::route(config))
.route("/api/:project_id/traces-data/", traces_data::route(config))
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it currently "traces-data"?

Copy link
Member Author

Choose a reason for hiding this comment

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

In the previous impl it was /spans/ i wanted to name it after the data type it accepts (TracesData) to be consistent with /minidump/, /csp-report/, etc. But reading the link above a bit more, we should maybe even name it /otel/v1/traces/ to be future proof.

For OTLP/HTTP, exporters in the SDK construct signal-specific URLs when this environment variable is set. This means that if you’re sending traces, metrics, and logs, the following URLs are constructed from the example above:

Traces: "http://my-api-endpoint/v1/traces"
Metrics: "http://my-api-endpoint/v1/metrics"
Logs: "http://my-api-endpoint/v1/logs"

https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/#otel_exporter_otlp_endpoint

@@ -74,6 +75,7 @@ pub fn routes(config: &Config) -> Router<ServiceState>{
.route("/api/:project_id/minidump/", minidump::route(config))
.route("/api/:project_id/events/:event_id/attachments/", post(attachments::handle))
.route("/api/:project_id/unreal/:sentry_key/", unreal::route(config))
.route("/api/:project_id/traces-data/", traces_data::route(config))
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it currently "traces-data"?

relay-server/src/envelope.rs Show resolved Hide resolved
@jjbayer jjbayer marked this pull request as draft November 7, 2024 15:25
@jjbayer
Copy link
Member Author

jjbayer commented Nov 7, 2024

Converting back to draft, unclear if needed.

@jjbayer jjbayer removed their assignment Nov 8, 2024
@jjbayer jjbayer closed this Nov 12, 2024
@jjbayer jjbayer reopened this Nov 15, 2024
@jjbayer jjbayer self-assigned this Nov 15, 2024
@jjbayer jjbayer marked this pull request as ready for review November 15, 2024 10:40
@jjbayer jjbayer enabled auto-merge (squash) November 18, 2024 09:07
@jjbayer jjbayer merged commit 1c16ca3 into master Nov 19, 2024
23 checks passed
@jjbayer jjbayer deleted the feat/spans-otel-endpoint branch November 19, 2024 12:03
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.

3 participants