Skip to content
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

ref: Update http instrumentation name for logging #13716

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Sep 18, 2024

With this change, it is easier to figure out from logs if the correct or incorrect http instrumentation is added.

Now, if you see e.g. this in the logs, if users have enabled logs (debug: true if not using skipOpenTelemetrySetup: true, else using native OTEL debug logs with e.g. diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG)):

@opentelemetry/instrumentation-http-sentry Applying instrumentation patch for nodejs core module on require hook { module: 'http' }
@opentelemetry/instrumentation-http Applying instrumentation patch for nodejs core module on require hook { module: 'http' }

you can tell that that it has been double instrumenting this incorrectly. You should never see the @opentelemetry/instrumentation-http entry anymore, otherwise something is wrong there.

This came out of getsentry/sentry-docs#11378, I looked into various ways to debug this but there is not really an API provided by OTEL that allows us to figure this out 😬

With this change, it is easier to figure out from logs if the correct or incorrect http instrumentation is added.

Now, if you see e.g. this in the logs, if users have enabled logs (`debug: true` if not using `skipOpenTelemetrySetup: true`, else e.g. `diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG)`):

```js
@opentelemetry/instrumentation-http-sentry Applying instrumentation patch for nodejs core module on require hook { module: 'http' }
@opentelemetry/instrumentation-http Applying instrumentation patch for nodejs core module on require hook { module: 'http' }
```

you can tell that that it has been double instrumenting this incorrectly.
@mydea mydea self-assigned this Sep 18, 2024
Copy link
Contributor

github-actions bot commented Sep 18, 2024

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 22.52 KB - -
@sentry/browser - with treeshaking flags 21.3 KB - -
@sentry/browser (incl. Tracing) 34.8 KB - -
@sentry/browser (incl. Tracing, Replay) 71.26 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.7 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 75.61 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 88.39 KB +0.07% +57 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 90.23 KB +0.07% +57 B 🔺
@sentry/browser (incl. metrics) 26.83 KB - -
@sentry/browser (incl. Feedback) 39.66 KB +0.14% +56 B 🔺
@sentry/browser (incl. sendFeedback) 27.19 KB - -
@sentry/browser (incl. FeedbackAsync) 31.96 KB +0.18% +57 B 🔺
@sentry/react 25.28 KB - -
@sentry/react (incl. Tracing) 37.77 KB - -
@sentry/vue 26.72 KB - -
@sentry/vue (incl. Tracing) 36.67 KB - -
@sentry/svelte 22.66 KB - -
CDN Bundle 23.83 KB +0.23% +54 B 🔺
CDN Bundle (incl. Tracing) 36.56 KB +0.16% +57 B 🔺
CDN Bundle (incl. Tracing, Replay) 71.02 KB +0.08% +56 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 76.33 KB +0.08% +61 B 🔺
CDN Bundle - uncompressed 69.81 KB +0.23% +159 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 108.44 KB +0.15% +159 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 220.21 KB +0.08% +159 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 233.43 KB +0.07% +159 B 🔺
@sentry/nextjs (client) 37.53 KB - -
@sentry/sveltekit (client) 35.37 KB - -
@sentry/node 121.11 KB +0.05% +53 B 🔺
@sentry/node - without tracing 93.41 KB +0.08% +70 B 🔺
@sentry/aws-serverless 103.12 KB +0.07% +72 B 🔺

View base workflow run

packages/node/src/integrations/http.ts Outdated Show resolved Hide resolved
@mydea mydea merged commit 479aa11 into develop Sep 18, 2024
130 checks passed
@mydea mydea deleted the fn/http-instrumentation-warning branch September 18, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants