Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ type Props = {
showSecretKey?: boolean;
showSecurityEndpoint?: boolean;
showUnreal?: boolean;
showVercelLogDrainEndpoint?: boolean;
};

type TabValue = 'otlp' | 'security' | 'minidump' | 'unreal' | 'vercel' | 'credentials';
Expand Down Expand Up @@ -174,7 +173,6 @@ function ProjectKeyCredentials({
showSecretKey = false,
showOtlpTraces = false,
showOtlpLogs = false,
showVercelLogDrainEndpoint = false,
showSecurityEndpoint = true,
showUnreal = true,
}: Props) {
Expand Down Expand Up @@ -210,15 +208,14 @@ function ProjectKeyCredentials({
{
key: 'vercel',
label: t('Vercel Drains'),
visible: showVercelLogDrainEndpoint || showOtlpTraces,
visible: true,
},
];
return tabs.filter(tab => tab.visible);
}, [
showOtlpTraces,
showOtlpLogs,
showSecurityEndpoint,
showVercelLogDrainEndpoint,
showMinidump,
showUnreal,
showPublicKey,
Expand Down Expand Up @@ -271,7 +268,6 @@ function ProjectKeyCredentials({
case 'vercel':
return (
<VercelTab
showVercelLogDrainEndpoint={showVercelLogDrainEndpoint}
integrationEndpoint={data.dsn.integration}
publicKey={data.public}
showOtlpTraces={showOtlpTraces}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,44 @@ interface VercelTabProps {
integrationEndpoint: string;
publicKey: string;
showOtlpTraces: boolean;
showVercelLogDrainEndpoint: boolean;
tracesEndpoint: string;
}

export function VercelTab({
showVercelLogDrainEndpoint,
integrationEndpoint,
publicKey,
showOtlpTraces,
tracesEndpoint,
}: VercelTabProps) {
return (
<Fragment>
{showVercelLogDrainEndpoint && (
<Fragment>
<FieldGroup
label={t('Vercel Log Drain Endpoint')}
help={tct(
'Use this endpoint to configure Vercel Log Drains. [link:Learn more]',
{
link: (
<ExternalLink href="https://docs.sentry.io/product/drains/integration/vercel/#log-drains" />
),
}
)}
inline={false}
flexibleControlStateSize
>
<TextCopyInput aria-label={t('Vercel Log Drain Endpoint')}>
{`${integrationEndpoint}vercel/logs`}
</TextCopyInput>
</FieldGroup>
<FieldGroup
label={t('Vercel Log Drain Endpoint')}
help={tct('Use this endpoint to configure Vercel Log Drains. [link:Learn more]', {
link: (
<ExternalLink href="https://docs.sentry.io/product/drains/integration/vercel/#log-drains" />
),
})}
inline={false}
flexibleControlStateSize
>
<TextCopyInput aria-label={t('Vercel Log Drain Endpoint')}>
{`${integrationEndpoint}vercel/logs`}
</TextCopyInput>
</FieldGroup>

<FieldGroup
label={t('Log Drain Authentication Headers')}
help={t(
'Set these authentication headers when configuring your Vercel Log Drain.'
)}
inline={false}
flexibleControlStateSize
>
<TextCopyInput aria-label={t('Log Drain Authentication Header')}>
{`x-sentry-auth: sentry sentry_key=${publicKey}`}
</TextCopyInput>
</FieldGroup>
</Fragment>
)}
<FieldGroup
label={t('Log Drain Authentication Headers')}
help={t(
'Set these authentication headers when configuring your Vercel Log Drain.'
)}
inline={false}
flexibleControlStateSize
>
<TextCopyInput aria-label={t('Log Drain Authentication Header')}>
{`x-sentry-auth: sentry sentry_key=${publicKey}`}
</TextCopyInput>
</FieldGroup>
{showOtlpTraces && (
<Fragment>
<FieldGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ export function KeySettings({
const showOtlpTraces =
useOTelFriendlyUI() && organization.features.includes('relay-otlp-traces-endpoint');
const showOtlpLogs = organization.features.includes('relay-otel-logs-endpoint');
const showVercelLogDrainEndpoint = organization.features.includes(
'relay-vercel-log-drain-endpoint'
);

return (
<Fragment>
Expand Down Expand Up @@ -156,7 +153,6 @@ export function KeySettings({
data={data}
showOtlpTraces={showOtlpTraces}
showOtlpLogs={showOtlpLogs}
showVercelLogDrainEndpoint={showVercelLogDrainEndpoint}
showPublicKey
showSecretKey
showProjectId
Expand Down
5 changes: 0 additions & 5 deletions static/app/views/settings/project/projectKeys/list/keyRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ function KeyRow({
const showOtlpTraces =
useOTelFriendlyUI() && organization.features.includes('relay-otlp-traces-endpoint');
const showOtlpLogs = organization.features.includes('relay-otel-logs-endpoint');
const showVercelLogDrainEndpoint = organization.features.includes(
'relay-vercel-log-drain-endpoint'
);

return (
<Panel>
Expand Down Expand Up @@ -107,12 +104,10 @@ function KeyRow({
data={data}
showOtlpTraces={showOtlpTraces}
showOtlpLogs={showOtlpLogs}
showVercelLogDrainEndpoint={showVercelLogDrainEndpoint}
showMinidump={!isJsPlatform}
showUnreal={!isJsPlatform}
showSecurityEndpoint={!isJsPlatform}
/>

{isBrowserJavaScript && (
<LoaderScript
projectKey={data}
Expand Down
Loading