Skip to content

Commit a96651d

Browse files
authored
feat(settings): Add base OTLP endpoint (#102405)
Add a base OTLP endpoint to the setting page. This would be something like `https://o0.ingest.sentry.io/api/0/integration/otlp` compared to `https://o0.ingest.sentry.io/api/0/integration/otlp/v1/traces` (the traces specific endpoint). This helps us for use cases like Neon that require you to only pass in a base OTLP endpoint: https://neon.com/docs/guides/opentelemetry
1 parent f534f13 commit a96651d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

static/app/views/settings/project/projectKeys/credentials/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ function ProjectKeyCredentials({
258258
case 'otlp':
259259
return (
260260
<OtlpTab
261+
integrationEndpoint={data.dsn.integration}
261262
logsEndpoint={data.dsn.otlp_logs}
262263
tracesEndpoint={data.dsn.otlp_traces}
263264
publicKey={data.public}

static/app/views/settings/project/projectKeys/credentials/otlp.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import TextCopyInput from 'sentry/components/textCopyInput';
88
import {t, tct} from 'sentry/locale';
99

1010
interface OtlpTabProps {
11+
integrationEndpoint: string;
1112
logsEndpoint: string;
1213
publicKey: string;
1314
showOtlpLogs: boolean;
@@ -21,6 +22,7 @@ export function OtlpTab({
2122
publicKey,
2223
showOtlpLogs,
2324
showOtlpTraces,
25+
integrationEndpoint,
2426
}: OtlpTabProps) {
2527
// Build the OTEL collector config example
2628
const buildCollectorConfig = useMemo(() => {
@@ -51,6 +53,16 @@ export function OtlpTab({
5153

5254
return (
5355
<Fragment>
56+
<FieldGroup
57+
label={t('OTLP Endpoint')}
58+
help={t('This is the base OTLP endpoint.')}
59+
inline={false}
60+
flexibleControlStateSize
61+
>
62+
<TextCopyInput aria-label={t('OTLP Endpoint')}>
63+
{`${integrationEndpoint}/otlp`}
64+
</TextCopyInput>
65+
</FieldGroup>
5466
{showOtlpLogs && (
5567
<Fragment>
5668
<FieldGroup

0 commit comments

Comments
 (0)