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

Update console recording to use OTEL conventions #8471

Open
ccschmitz opened this issue May 6, 2024 — with Linear · 2 comments
Open

Update console recording to use OTEL conventions #8471

ccschmitz opened this issue May 6, 2024 — with Linear · 2 comments

Comments

Copy link
Contributor

No description provided.

Copy link

linear bot commented May 6, 2024

Copy link

greptile-apps bot commented May 6, 2024

To update the console recording to use OTEL conventions, follow these steps tailored to the highlight/highlight codebase:

  1. Adapt ConsoleListener in console-listener.tsx:

    • Modify the ConsoleMessage type to align with OTEL's log data model, including attributes like traceId, spanId, and severityText.
    • Update the callback function within ConsoleListener to map console log levels to OTEL's severityText and include traceId and spanId if available.
  2. Update Node.js SDK in hooks.ts:

    • In hookConsole, ensure that the ConsolePayload includes OTEL-compliant fields such as severityText, traceId, and spanId.
    • Adjust the safeStringify function or its usage to ensure complex objects are serialized in a manner consistent with OTEL's structured logging approach.
  3. Ensure Consistency Across Environments:

    • Verify that both client-side and server-side implementations serialize log attributes and context information following OTEL conventions.
    • Consider adding or updating tests to cover the new OTEL-compliant logging behavior.
  4. Documentation and Examples:

    • Update the documentation in /docs-content/getting-started/7_native-opentelemetry/3_logging.md to reflect the changes in logging conventions.
    • Provide examples of the new logging output in both the documentation and in /blog-content/building-our-logging-integrations.md to illustrate the integration with OTEL.

These steps are specific to the highlight/highlight codebase and are designed to align the console recording feature with OTEL logging conventions, enhancing interoperability and consistency in telemetry data.

References

highlight/highlight/sdk/client/src/listeners/console-listener.tsx
highlight/highlight/sdk/highlight-node/src/hooks.ts
highlight/highlight/docs-content/getting-started/7_native-opentelemetry/3_logging.md
highlight/highlight/sdk/highlight-node/src/types.ts
highlight/highlight/highlight.io/components/QuickstartContent/backend/otlp.tsx
highlight/highlight/blog-content/building-our-logging-integrations.md

Ask Greptile

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

No branches or pull requests

1 participant