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

GSoC 2024: add otel4s project #500

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

iRevive
Copy link

@iRevive iRevive commented Mar 12, 2024

Greetings! Here are a few GSoC ideas for the otel4s project. Last year, Sherrie prototyped the tracing SDK, which we successfully implemented using pure Scala. The SDK is available for all platforms: JVM, Scala.js, and Scala Native.

However, some features are missing. And it would be nice to implement them.

1) Environment-aware TelemetryResource configurer

OpenTelemetry Java can detect a large variety of environments (e.g. GCP, AWS ECS, etc) and add additional
environment-specific attributes to the TelemetryResource. For example, when an application runs in the container, the container.id attribute can be added to the telemetry resource.

We can implement the following:
a) Common: Container, Host, OS, Process
b) Google Cloud: GCP
c) AWS: Beanstalk, EC2, ECS, EKS, Lambda

2) Trace SDK - support span limits

The purpose is to keep the number of a) Attributes, b) Links, and c) Events under the configured limit.
Details: typelevel/otel4s#481.

3) SDK exporter - implement gRPC-client

We already have protobuf models and an HTTP OTLP client, but the gRPC client still needs to be implemented. Since we need a pure Scala implementation, we can experiment with https://github.com/http4s/http4s-grpc.

4) Context propagators

Some propagators haven't been implemented yet:

5) Prometheus metrics exporter

Note: The metrics SDK has not been implemented yet, and I doubt it will be ready by the start of GSoC.

An HTTP server that exposes metrics in Prometheus-compatible format.

https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md
https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus

6) Integration with cats-effect

It's more of a cats-effect project than otel4s. Perhaps some ideas from the existing PR could be reused.

7) Integration with fs2

It would be interesting to explore options to implement propagation within Stream scopes.
We have Span[F].startUnmanaged, so perhaps there is a way to hack this functionality.

@iRevive
Copy link
Author

iRevive commented Mar 12, 2024

@rossabaker @armanbilge please take a look.

@samspills
Copy link
Contributor

Oops sorry @armanbilge I can't officially request a review from you it seems 😅

@rossabaker
Copy link
Member

Sorry, this must have gotten lost in one of my notification bankruptcies. Do you want to keep it open for a potential 2025 revival?

@iRevive
Copy link
Author

iRevive commented Aug 30, 2024

Hey @rossabaker. Some of the listed features have already been implemented. But I'm sure we will have something interesting for 2025 :)

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.

3 participants