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

Add opentelemetry/webjs to our SDK #8469

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

Add opentelemetry/webjs to our SDK #8469

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 integrate OpenTelemetry for Web JavaScript (webjs) into our SDK, follow these steps:

  1. Review Existing SDK Implementations: Look at our Node.js (/sdk/highlight-node) and Cloudflare Workers (/sdk/highlight-cloudflare) SDKs for patterns on how OpenTelemetry is integrated within those environments. This will give you a sense of how to structure the integration for webjs.

  2. Consult Native OpenTelemetry Documentation: The /docs-content/getting-started/7_native-opentelemetry directory contains valuable information on using OpenTelemetry SDKs. Pay special attention to the principles and practices that could apply to webjs.

  3. Mock Server for Testing: Utilize the mock OpenTelemetry server (/packages/mock-otel-server) for developing and testing the webjs integration. This allows you to simulate an OpenTelemetry server environment, making it easier to test your integration without needing a live backend.

  4. Implementation Steps:

    • Initialize the OpenTelemetry Web SDK within the webjs environment, ensuring you capture relevant telemetry data (traces, metrics, logs).
    • Configure the SDK to export the telemetry data to the Highlight backend, similar to how other SDKs are configured.
    • Ensure error handling, logging, and tracing are properly implemented, following the guidelines in our OpenTelemetry documentation.
  5. Testing: Use the /opentelemetry-sdk-workers directory as a reference for setting up any necessary infrastructure for testing the webjs SDK with OpenTelemetry.

This approach ensures a consistent and efficient integration of OpenTelemetry webjs into our SDK, leveraging existing patterns and infrastructure.

References

highlight/highlight/sdk
highlight/highlight/docs-content/getting-started/7_native-opentelemetry
highlight/highlight/packages/mock-otel-server
highlight/highlight/opentelemetry-sdk-workers

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