diff --git a/docs/concepts/otlp/index.mdx b/docs/concepts/otlp/index.mdx
index ba5317bf7dd10..10ae84876812d 100644
--- a/docs/concepts/otlp/index.mdx
+++ b/docs/concepts/otlp/index.mdx
@@ -5,14 +5,17 @@ description: "Learn how to send OpenTelemetry trace data directly to Sentry from
keywords: ["otlp", "otel", "opentelemetry"]
---
-
+Sentry can ingest [OpenTelemetry](https://opentelemetry.io) traces and logs directly via the [OpenTelemetry Protocol](https://opentelemetry.io/docs/specs/otel/protocol/). Sentry does not support ingesting OTLP metrics.
-Sentry can ingest [OpenTelemetry](https://opentelemetry.io) traces directly via the [OpenTelemetry Protocol](https://opentelemetry.io/docs/specs/otel/protocol/). If you have an existing OpenTelemetry trace instrumentation, you can configure your OpenTelemetry exporter to send traces to Sentry directly. Sentry's OTLP ingestion endpoint is currently in development, and has a few known limitations:
+## OpenTelemetry Traces
+
+
+
+If you have an existing OpenTelemetry trace instrumentation, you can configure your OpenTelemetry exporter to send traces to Sentry directly. Sentry's OTLP ingestion traces endpoint is currently in development, and has a few known limitations:
- Span events are not supported. All span events are dropped during ingestion.
- Span links are partially supported. We ingest and display span links, but they cannot be searched, filtered, or aggregated. Links are are shown in the [Trace View](/concepts/key-terms/tracing/trace-view/).
- Array attributes are partially supported. We ingest and display array attributes, but they cannot be searched, filtered, or aggregated. Array attributes are shown in the [Trace View](/concepts/key-terms/tracing/trace-view/).
-- Sentry does not support ingesting OTLP metrics or OTLP logs.
The easiest way to configure an OpenTelemetry exporter is with environment variables. You'll need to configure the trace endpoint URL, as well as the authentication headers. Set these variables on the server where your application is running.
@@ -39,8 +42,215 @@ const sdk = new NodeSDK({
sdk.start();
```
-You can find the values of Sentry's OTLP endpoint and public key in your Sentry project settings.
+You can find the values of Sentry's OTLP traces endpoint and public key in your Sentry project settings.
+
+1. Go to the [Settings > Projects](https://sentry.io/orgredirect/organizations/:orgslug/settings/projects/) page in Sentry.
+2. Select a project from the list.
+3. Go to the "Client Keys (DSN)" sub-page for this project under the "SDK Setup" heading.
+
+## OpenTelemetry Logs
+
+
+
+If you have an existing OpenTelemetry log instrumentation, you can configure your OpenTelemetry exporter to send logs to Sentry directly. Sentry's OTLP ingestion logs endpoint has the following known limitations:
+
+- Array attributes are partially supported. We ingest and display array attributes, but they cannot be searched, filtered, or aggregated.
+
+The easiest way to configure an OpenTelemetry exporter is with environment variables. You'll need to configure the trace endpoint URL, as well as the authentication headers. Set these variables on the server where your application is running.
+
+```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___"
+```
+
+Alternatively, you can configure the OpenTelemetry Exporter directly in your application code. Here is an example with the OpenTelemetry 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");
+```
+
+You can find the values of Sentry's OTLP logs endpoint and public key in your Sentry project settings.
1. Go to the [Settings > Projects](https://sentry.io/orgredirect/organizations/:orgslug/settings/projects/) page in Sentry.
2. Select a project from the list.
3. Go to the "Client Keys (DSN)" sub-page for this project under the "SDK Setup" heading.
+
+## Distributed Tracing between Sentry Instrumentation and OpenTelemetry Instrumentation
+
+If you have a frontend or services instrumented with the Sentry SDK, and you are also instrumenting with OpenTelemetry, you can use the `propagateTraceparent` exposed in the Sentry SDK to propagate the W3C Trace Context `traceparent` header to the OpenTelemetry instrumentation. This will allow you to continue traces from Sentry instrumented services.
+
+The following SDKs support the `propagateTraceparent` option:
+
+### JavaScript
+
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
diff --git a/includes/feature-available-alpha-logs.mdx b/includes/feature-available-alpha-logs.mdx
new file mode 100644
index 0000000000000..58143fd56318c
--- /dev/null
+++ b/includes/feature-available-alpha-logs.mdx
@@ -0,0 +1,5 @@
+
+
+This feature is in alpha and is only available if your organization is participating in its limited release. Please reach out to [feedback-logging@sentry.io](mailto:feedback-logging@sentry.io) if you want access. Features in alpha are still in-progress and may have bugs. We recognize the irony.
+
+
diff --git a/includes/feature-available-alpha-otlp.mdx b/includes/feature-available-alpha-otlp.mdx
deleted file mode 100644
index 815ed1fee85e0..0000000000000
--- a/includes/feature-available-alpha-otlp.mdx
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-This feature is in beta and is only available if your organization is participating in its limited release. Please reach out to [feedback-tracing@sentry.io](mailto:feedback-tracing@sentry.io) if you want access. Features in beta are still in-progress and may have bugs. We recognize the irony.
-
-
diff --git a/includes/feature-available-alpha-tracing.mdx b/includes/feature-available-alpha-tracing.mdx
new file mode 100644
index 0000000000000..9051b88dbd0cf
--- /dev/null
+++ b/includes/feature-available-alpha-tracing.mdx
@@ -0,0 +1,5 @@
+
+
+This feature is in alpha and is only available if your organization is participating in its limited release. Please reach out to [feedback-tracing@sentry.io](mailto:feedback-tracing@sentry.io) if you want access. Features in alpha are still in-progress and may have bugs. We recognize the irony.
+
+
diff --git a/includes/feature-stage-alpha-metrics.mdx b/includes/feature-stage-alpha-metrics.mdx
deleted file mode 100644
index 67bebf0fd09ff..0000000000000
--- a/includes/feature-stage-alpha-metrics.mdx
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-Sentry Metrics is currently in Alpha, so be gentle - features are still in-progress and may have bugs. We recognize the irony.
-If you would like to join the Alpha program, you can register [here](https://sentry.io/lp/metrics/).
-
-
diff --git a/includes/feature-stage-beta-metrics.mdx b/includes/feature-stage-beta-metrics.mdx
deleted file mode 100644
index 6e7b759e11cde..0000000000000
--- a/includes/feature-stage-beta-metrics.mdx
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-Sentry Metrics is currently in open beta, so be gentle - features are still in-progress and may have bugs. We recognize the irony.
-For any questions or feedback, you can reach us on [Discord](https://discord.gg/sentry) or [GitHub](https://github.com/getsentry/sentry/discussions/64195).
-
-
diff --git a/src/components/codeContext.tsx b/src/components/codeContext.tsx
index e70635a4eec1c..ad678268bf939 100644
--- a/src/components/codeContext.tsx
+++ b/src/components/codeContext.tsx
@@ -14,6 +14,7 @@ type ProjectCodeKeywords = {
ORG_ID: number;
ORG_INGEST_DOMAIN: string;
ORG_SLUG: string;
+ OTLP_LOGS_URL: string;
OTLP_TRACES_URL: string;
PROJECT_ID: number;
PROJECT_SLUG: string;
@@ -88,6 +89,7 @@ export const DEFAULTS: CodeKeywords = {
'https://o0.ingest.sentry.io/api/0/minidump/?sentry_key=examplePublicKey',
UNREAL_URL: 'https://o0.ingest.sentry.io/api/0/unreal/examplePublicKey/',
OTLP_TRACES_URL: 'https://o0.ingest.sentry.io/api/0/otlp/v1/traces/',
+ OTLP_LOGS_URL: 'https://o0.ingest.sentry.io/api/0/integrations/otlp/v1/logs/',
title: `example-org / example-project`,
},
],
@@ -143,6 +145,10 @@ const formatOtlpTracesUrl = ({scheme, host, pathname}: Dsn) => {
return `${scheme}${host}/api${pathname}/otlp/v1/traces/`;
};
+const formatOtlpLogsUrl = ({scheme, host, pathname}: Dsn) => {
+ return `${scheme}${host}/api${pathname}/integrations/otlp/v1/logs/`;
+};
+
const formatApiUrl = ({scheme, host}: Dsn) => {
const apiHost = host.indexOf('.ingest.') >= 0 ? host.split('.ingest.')[1] : host;
@@ -236,6 +242,7 @@ export async function fetchCodeKeywords(): Promise {
MINIDUMP_URL: formatMinidumpURL(parsedDsn),
UNREAL_URL: formatUnrealEngineURL(parsedDsn),
OTLP_TRACES_URL: formatOtlpTracesUrl(parsedDsn),
+ OTLP_LOGS_URL: formatOtlpLogsUrl(parsedDsn),
title: `${project.organizationSlug} / ${project.projectSlug}`,
};
}),