Skip to content

fix(opentelemetry): fix stringified internal errors in logs#962

Merged
EmrysMyrddin merged 2 commits intomainfrom
fix/otel/global-error-handler
Mar 27, 2025
Merged

fix(opentelemetry): fix stringified internal errors in logs#962
EmrysMyrddin merged 2 commits intomainfrom
fix/otel/global-error-handler

Conversation

@EmrysMyrddin
Copy link
Copy Markdown
Contributor

@EmrysMyrddin EmrysMyrddin commented Mar 27, 2025

related to GW-21

Copilot AI review requested due to automatic review settings March 27, 2025 16:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses the issue of stringified internal errors in OpenTelemetry logs by updating the instrumentation code to use a dedicated diagnostic logger and a global error handler.

  • Updated the OpenTelemetry plugin to use a child diagnostic logger (diagLogger) for internal logging.
  • Introduced a global error handler to log uncaught internal errors using diagLogger.
  • Updated the changeset file to describe the patch.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
packages/plugins/opentelemetry/src/plugin.ts Refactored logging to use a dedicated diagnostic logger and added global error handler for proper error logging
.changeset/pretty-ducks-raise.md Updated changeset description
Files not reviewed (1)
  • packages/plugins/opentelemetry/package.json: Language not supported
Comments suppressed due to low confidence (1)

packages/plugins/opentelemetry/src/plugin.ts:216

  • [nitpick] Consider using a more descriptive name for the diagnostic logger (for example, 'OpenTelemetryDiag') to align it with the plugin's naming conventions.
const diagLogger = pluginLogger.child('OtelDiag');

@theguild-bot
Copy link
Copy Markdown
Collaborator

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-hive/gateway 1.13.5-alpha-97fcec630f4715632b3db5e9498ee859fbb078ab npm ↗︎ unpkg ↗︎
@graphql-hive/nestjs 1.0.9-alpha-97fcec630f4715632b3db5e9498ee859fbb078ab npm ↗︎ unpkg ↗︎
@graphql-mesh/plugin-opentelemetry 1.3.53-alpha-97fcec630f4715632b3db5e9498ee859fbb078ab npm ↗︎ unpkg ↗︎

@theguild-bot
Copy link
Copy Markdown
Collaborator

🚀 Snapshot Release (Binary for Linux-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Copy Markdown
Collaborator

🚀 Snapshot Release (Binary for macOS-ARM64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Copy Markdown
Collaborator

🚀 Snapshot Release (Node Docker Image)

The latest changes of this PR are available as image on GitHub Container Registry (based on the declared changesets):

ghcr.io/graphql-hive/gateway:1.13.5-alpha-97fcec630f4715632b3db5e9498ee859fbb078ab

@theguild-bot
Copy link
Copy Markdown
Collaborator

🚀 Snapshot Release (Binary for Linux-ARM64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Copy Markdown
Collaborator

🚀 Snapshot Release (Bun Docker Image)

The latest changes of this PR are available as image on GitHub Container Registry (based on the declared changesets):

ghcr.io/graphql-hive/gateway:1.13.5-alpha-97fcec630f4715632b3db5e9498ee859fbb078ab-bun

@theguild-bot
Copy link
Copy Markdown
Collaborator

🚀 Snapshot Release (Binary for macOS-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Copy Markdown
Collaborator

🚀 Snapshot Release (Binary for Windows-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@EmrysMyrddin EmrysMyrddin merged commit c31234a into main Mar 27, 2025
61 checks passed
@EmrysMyrddin EmrysMyrddin deleted the fix/otel/global-error-handler branch March 27, 2025 19:31
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.

4 participants