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
8 changes: 4 additions & 4 deletions docs/platforms/android/logs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ With Sentry Structured Logs, you can send text-based log information from your a

<PlatformContent includePath="logs/usage" />

## Integrations

<PlatformContent includePath="logs/integrations" />

## Options

<PlatformContent includePath="logs/options" />
Expand All @@ -36,3 +32,7 @@ With Sentry Structured Logs, you can send text-based log information from your a
## Troubleshooting

<PlatformContent includePath="logs/troubleshooting" />

## Other Logging Integrations

<PlatformContent includePath="logs/integrations" />
8 changes: 4 additions & 4 deletions docs/platforms/dart/common/logs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ With Sentry Structured Logs, you can send text-based log information from your a

<PlatformContent includePath="logs/usage" />

## Integrations

<PlatformContent includePath="logs/integrations" />

## Options

<PlatformContent includePath="logs/options" />
Expand All @@ -34,3 +30,7 @@ With Sentry Structured Logs, you can send text-based log information from your a
## Troubleshooting

<PlatformContent includePath="logs/troubleshooting" />

## Other Logging Integrations

<PlatformContent includePath="logs/integrations" />
8 changes: 4 additions & 4 deletions docs/platforms/dotnet/common/logs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ With Sentry Structured Logs, you can send text-based log information from your a

<PlatformContent includePath="logs/usage" />

## Integrations

<PlatformContent includePath="logs/integrations" />

## Options

<PlatformContent includePath="logs/options" />

## Default Attributes

<PlatformContent includePath="logs/default-attributes" />

## Other Logging Integrations

<PlatformContent includePath="logs/integrations" />
8 changes: 4 additions & 4 deletions docs/platforms/go/common/logs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ With Sentry Structured Logs, you can send text-based log information from your a

<PlatformContent includePath="logs/usage" />

## Integrations

<PlatformContent includePath="logs/integrations" />

## Options

<PlatformContent includePath="logs/options" />
Expand All @@ -38,3 +34,7 @@ If the `Debug` init option is set to true, calls to the `sentry.Logger` will als
## Default Attributes

<PlatformContent includePath="logs/default-attributes" />

## Other Logging Integrations

<PlatformContent includePath="logs/integrations" />
8 changes: 4 additions & 4 deletions docs/platforms/java/common/logs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ With Sentry Structured Logs, you can send text-based log information from your a

<PlatformContent includePath="logs/usage" />

## Integrations

<PlatformContent includePath="logs/integrations" />

## Options

<PlatformContent includePath="logs/options" />

## Default Attributes

<PlatformContent includePath="logs/default-attributes" />

## Other Logging Integrations

<PlatformContent includePath="logs/integrations" />
8 changes: 4 additions & 4 deletions docs/platforms/php/common/logs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ With Sentry Structured Logs, you can send text-based log information from your a

<PlatformContent includePath="logs/usage" />

## Integrations

<PlatformContent includePath="logs/integrations" />

## Options

<PlatformContent includePath="logs/options" />

## Default Attributes

<PlatformContent includePath="logs/default-attributes" />

## Other Logging Integrations

<PlatformContent includePath="logs/integrations" />
8 changes: 4 additions & 4 deletions docs/platforms/python/logs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ With Sentry Structured Logs, you can send text-based log information from your a

<PlatformContent includePath="logs/usage" />

## Integrations

<PlatformContent includePath="logs/integrations" />

## Options

<PlatformContent includePath="logs/options" />

## Default Attributes

<PlatformContent includePath="logs/default-attributes" />

## Other Logging Integrations

<PlatformContent includePath="logs/integrations" />
8 changes: 4 additions & 4 deletions docs/platforms/react-native/logs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ With Sentry Structured Logs, you can send text-based log information from your a

<PlatformContent includePath="logs/usage" />

## Integrations

<PlatformContent includePath="logs/integrations" />

## Options

<PlatformContent includePath="logs/options" />
Expand All @@ -38,3 +34,7 @@ With Sentry Structured Logs, you can send text-based log information from your a
## Troubleshooting

<PlatformContent includePath="logs/troubleshooting" />

## Other Logging Integrations

<PlatformContent includePath="logs/integrations" />
8 changes: 4 additions & 4 deletions docs/platforms/ruby/logs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ With Sentry Structured Logs, you can send text-based log information from your a

<PlatformContent includePath="logs/usage" />

## Integrations

<PlatformContent includePath="logs/integrations" />

## Options

<PlatformContent includePath="logs/options" />

## Default Attributes

<PlatformContent includePath="logs/default-attributes" />

## Other Logging Integrations

<PlatformContent includePath="logs/integrations" />
4 changes: 3 additions & 1 deletion platform-includes/logs/integrations/dart.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Available integrations:
- [Dart Logging package](/platforms/dart/integrations/logging/)
<ul>
<IntegrationListItem href="/platforms/dart/integrations/logging/">Dart Logging package</IntegrationListItem>
</ul>

If there's an integration you would like to see, open a [new issue on GitHub](https://github.com/getsentry/sentry-dart/issues/new/choose).
10 changes: 6 additions & 4 deletions platform-includes/logs/integrations/dotnet.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Available integrations:
- [ASP.NET Core](/platforms/dotnet/guides/aspnetcore/logs/)
- [.NET Multi-platform App UI (.NET MAUI)](/platforms/dotnet/guides/maui/logs/)
- [Microsoft.Extensions.Logging](/platforms/dotnet/guides/extensions-logging/logs/)
- [Serilog](/platforms/dotnet/guides/serilog/logs/)
<ul>
<IntegrationListItem href="/platforms/dotnet/guides/aspnetcore/logs/">ASP.NET Core</IntegrationListItem>
<IntegrationListItem href="/platforms/dotnet/guides/maui/logs/">.NET Multi-platform App UI (.NET MAUI)</IntegrationListItem>
<IntegrationListItem href="/platforms/dotnet/guides/extensions-logging/logs/">Microsoft.Extensions.Logging</IntegrationListItem>
<IntegrationListItem href="/platforms/dotnet/guides/serilog/logs/">Serilog</IntegrationListItem>
</ul>

If there's an integration you would like to see, open a [new issue on GitHub](https://github.com/getsentry/sentry-dotnet/issues/new/choose).
9 changes: 5 additions & 4 deletions platform-includes/logs/integrations/go.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
### Supported libraries

- [Slog](/platforms/go/guides/slog)
- [Logrus](/platforms/go/guides/logrus)
Available integrations:
<ul>
<IntegrationListItem href="/platforms/go/guides/slog/logs/">Slog</IntegrationListItem>
<IntegrationListItem href="/platforms/go/guides/logrus/logs/">Logrus</IntegrationListItem>
</ul>

### `io.Writer` interface

Expand Down
12 changes: 7 additions & 5 deletions platform-includes/logs/integrations/java.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Available integrations:
- [Spring Boot using Logback](/platforms/java/guides/spring-boot/logging-frameworks/logback)
- [Spring Boot using Log4j2](/platforms/java/guides/spring-boot/logging-frameworks/log4j2)
- [Logback](/platforms/java/guides/logback/logs/)
- [Log4j2](/platforms/java/guides/log4j2/logs/)
- [JUL](/platforms/java/guides/jul/logs/)
<ul>
<IntegrationListItem href="/platforms/java/guides/spring-boot/logging-frameworks/logback">Spring Boot using Logback</IntegrationListItem>
<IntegrationListItem href="/platforms/java/guides/spring-boot/logging-frameworks/log4j2">Spring Boot using Log4j2</IntegrationListItem>
<IntegrationListItem href="/platforms/java/guides/logback/logs/">Logback</IntegrationListItem>
<IntegrationListItem href="/platforms/java/guides/log4j2/logs/">Log4j2</IntegrationListItem>
<IntegrationListItem href="/platforms/java/guides/jul/logs/">JUL</IntegrationListItem>
</ul>

If there's an integration you would like to see, open a [new issue on GitHub](https://github.com/getsentry/sentry-java/issues/new/choose).
4 changes: 3 additions & 1 deletion platform-includes/logs/integrations/php.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Available integrations:
- [Monolog](/platforms/php/integrations/monolog/#logs)
<ul>
<IntegrationListItem href="/platforms/php/integrations/monolog/#logs">Monolog</IntegrationListItem>
</ul>

If there's an integration you would like to see, open a [new issue on GitHub](https://github.com/getsentry/sentry-php/issues/new/choose).
36 changes: 36 additions & 0 deletions src/components/integrationLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import type {ReactNode} from 'react';

import {serverContext} from 'sentry-docs/serverContext';

import {SmartLink} from './smartLink';

function normalizePath(p: string): string {
return p.replace(/\/+$/, '') || '/';
}

function isCurrentPage(href: string): boolean {
const {path} = serverContext();
const currentPath = normalizePath('/' + path.join('/'));
const linkPath = normalizePath(href.startsWith('/') ? href : '/' + href);
return currentPath === linkPath;
}

type Props = {
children: ReactNode;
href: string;
};

/**
* List item that is omitted when href is the current page. Use in integration
* lists so the current guide/page is not shown as an option.
*/
export function IntegrationListItem({href, children}: Props) {
if (isCurrentPage(href)) {
return null;
}
return (
<li>
<SmartLink to={href}>{children}</SmartLink>
</li>
);
}
2 changes: 2 additions & 0 deletions src/mdxComponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {GitHubDomainChecker} from './components/githubDomainChecker';
import {GradleFeatureConfig} from './components/gradleFeatureConfig';
import {GradleUploadInstructions} from './components/gradleUploadInstructions';
import {GuideGrid} from './components/guideGrid';
import {IntegrationListItem} from './components/integrationLink';
import {JsBundleList} from './components/jsBundleList';
import {LambdaLayerDetail} from './components/lambdaLayerDetail';
import {LinkWithPlatformIcon} from './components/linkWithPlatformIcon';
Expand Down Expand Up @@ -93,6 +94,7 @@ export function mdxComponents(
Expandable,
FeatureBadge,
GuideGrid,
IntegrationListItem,
JsBundleList,
LambdaLayerDetail,
Link: SmartLink,
Expand Down
Loading