-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
docs(otlp): Restructure OTLP page to elevate propagateTraceparent #16264
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
Merged
+242
−243
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f2ed0aa
restructure to elevate propagateTraceparent
jaffrepaul b704bad
separate concepts + refinements
jaffrepaul 39fad72
layout & naming updates
jaffrepaul 4e81fd1
fix urls
jaffrepaul 4d33ca3
update OTLPIntegration list
jaffrepaul 7af9ff2
add trace sampling option
jaffrepaul 37decf0
move limitations to the bottom
jaffrepaul 792c3b4
fix logs slug
jaffrepaul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| --- | ||
| title: OTLP Logs | ||
| sidebar_title: OTLP Logs in Sentry | ||
| sidebar_order: 30 | ||
| description: "Send OpenTelemetry logs directly to Sentry without a Sentry SDK." | ||
| keywords: ["otlp", "otel", "opentelemetry", "logs", "logging"] | ||
| --- | ||
|
|
||
| <Include name="feature-available-open-beta-logs.mdx" /> | ||
|
|
||
| If you're using OTel without a Sentry SDK, you can send logs directly to Sentry's OTLP endpoint. You can find your endpoint URL and auth key in [Project settings > Client Keys (DSN)](https://sentry.io/orgredirect/organizations/:orgslug/settings/projects/). | ||
|
|
||
| ## Configuration | ||
|
|
||
| ```bash {filename: .env} | ||
| export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT="___OTLP_LOGS_URL___" | ||
| export OTEL_EXPORTER_OTLP_LOGS_HEADERS="x-sentry-auth=sentry sentry_key=___PUBLIC_KEY___" | ||
| ``` | ||
|
|
||
| ## Using the OTel Collector | ||
|
|
||
| You can configure your OTel collector instance to send logs to Sentry directly. This requires you to add an `otlphttp` exporter to your collector instance. Sentry's OTLP endpoints are project-specific, so you might also need to add a [routing connector](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/routingconnector) to route logs to the correct project. | ||
|
|
||
| ```yaml {filename: otel-collector.yaml} | ||
| exporters: | ||
| otlphttp: | ||
| logs_endpoint: ___OTLP_LOGS_URL___ | ||
| headers: | ||
| x-sentry-auth: "sentry sentry_key=___PUBLIC_KEY___" | ||
| compression: gzip | ||
| encoding: proto | ||
| timeout: 30s | ||
| ``` | ||
|
|
||
| ## Using an OTel SDK | ||
|
|
||
| You can configure the OTel Exporter directly in your application code. Here is an example with the OTel Node SDK: | ||
|
|
||
| ```typescript {filename: app.ts} | ||
| import { | ||
| LoggerProvider, | ||
| BatchLogRecordProcessor, | ||
| } from "@opentelemetry/sdk-logs"; | ||
| import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http"; | ||
|
|
||
| const logExporter = new OTLPLogExporter({ | ||
| url: "___OTLP_LOGS_URL___", | ||
| headers: { | ||
| "x-sentry-auth": "sentry sentry_key=___PUBLIC_KEY___", | ||
| }, | ||
| }); | ||
| const loggerProvider = new LoggerProvider({ | ||
| processors: [new BatchLogRecordProcessor(logExporter)], | ||
| }); | ||
|
|
||
| const logger = loggerProvider.getLogger("default", "1.0.0"); | ||
| ``` | ||
|
|
||
| ## Known Limitations | ||
|
|
||
| - Array attributes are partially supported. We ingest and display array attributes, but they cannot be searched, filtered, or aggregated. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.