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

Start using OTEL to send rrweb data #8474

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

Start using OTEL to send rrweb data #8474

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

Comments

Copy link
Contributor

Consolidate the push payload logic and just use OTEL's implementation for sending/receiving data. Should replace all our custom batching logic.

Copy link

linear bot commented May 6, 2024

Copy link

greptile-apps bot commented May 6, 2024

To integrate OTEL for sending rrweb data and replace the custom batching logic, follow these steps:

  1. Client-Side Changes:

    • Modify /sdk/client/src/index.tsx to use OpenTelemetry's JavaScript SDK for capturing rrweb events. Implement the telemetry data collection using the OpenTelemetry API.
    • Ensure rrweb events are formatted according to the OpenTelemetry specification for logs or custom events.
  2. Backend Processing:

    • In backend/public-graph/graph/resolver.go, adjust the logic for handling incoming payloads to parse data formatted according to the OpenTelemetry specification.
    • Utilize the OpenTelemetry Collector for preprocessing and routing the data as needed.
  3. OpenTelemetry Collector Configuration:

    • Refer to /e2e/opentelemetry/filelog/otel-collector.yaml for configuring the OpenTelemetry Collector. Ensure it's set up to receive logs or custom telemetry data from the client-side SDK.
    • Use processors in the collector configuration to batch, filter, or transform data as required before exporting it to the backend.
  4. Documentation and Examples:

    • Review /internal-docs/rfcs/001-logging.md for insights into the logging feature implementation using OpenTelemetry.
    • Check /docs-content/getting-started/7_native-opentelemetry/1_overview.md for an overview of integrating OpenTelemetry with your application.

This approach leverages OpenTelemetry's comprehensive tooling for telemetry data to streamline the process of sending rrweb data, ensuring efficient batching and processing.

References

highlight/highlight/sdk/client/src/index.tsx
highlight/highlight/backend/public-graph/graph/resolver.go
highlight/highlight/backend/kafka-queue/types.go
highlight/highlight/internal-docs/rfcs/001-logging.md
highlight/highlight/e2e/opentelemetry/filelog/otel-collector.yaml
highlight/highlight/docs-content/getting-started/7_native-opentelemetry/1_overview.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