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

General OpenTelemetry backend #1411

Merged
merged 13 commits into from
Apr 25, 2022
Merged

General OpenTelemetry backend #1411

merged 13 commits into from
Apr 25, 2022

Conversation

Pask423
Copy link
Contributor

@Pask423 Pask423 commented Apr 15, 2022

closes #1402

@Pask423 Pask423 self-assigned this Apr 15, 2022
build.sbt Show resolved Hide resolved
private implicit val _monad: MonadError[F] = responseMonad
type PE = P with Effect[F]

def send[T, R >: PE](request: Request[T, R]): F[Response[T]] = {
Copy link
Member

Choose a reason for hiding this comment

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

the impl looks quite different from the zio one, but I suspect that's beacuse the zio library was doing some of the work that happens here? I'm not familiar with other opentelemetry integrations, if that's what is usually done, fine :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used example from io.opentelemetry.api.trace.Tracer class with automatic context propagation it seemed reasonable

@Pask423 Pask423 changed the title Draft: General OpenTelemetry backend General OpenTelemetry backend Apr 20, 2022

private def prepareBaseAttributes[R >: PE, T](request: Request[T, R]) = {
Attributes.of(
AttributeKey.stringKey("http.method"),
Copy link
Member

Choose a reason for hiding this comment

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

aren't these keys available via SemanticAttributes ?

Also, why do we set the method & url, but not the target, scheme, host, etc?

Copy link
Contributor Author

@Pask423 Pask423 Apr 20, 2022

Choose a reason for hiding this comment

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

you are sure that SemanticAttributes are reachable from this project ?
I decide to set same params as for opentracingbackend

Copy link
Member

Choose a reason for hiding this comment

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

no, I saw the constant in the docs, maybe it's not in the api
though the example in the docs for a http client call sets only method & url, so maybe that's standard

@adamw
Copy link
Member

adamw commented Apr 20, 2022

Reading through https://opentelemetry.io/docs/instrumentation/java/manual/, I see that there's also a metrics api.

Maybe we should have both an OpenTelemetryTracingBackend and OpenTelemetryMetricsBackend? The latter with metrics similar as in the prometheus one, for example.

@Pask423
Copy link
Contributor Author

Pask423 commented Apr 20, 2022

Why not I will make it in separate PR.
Maybe we should deprecate/remove OpenTracingBackend as Open Tracing itself is deprecated in favor of Open Telemetry ?

@adamw
Copy link
Member

adamw commented Apr 25, 2022

@Pask423 looks good. Fine with a separate PR and removing open tracing :)

@Pask423 Pask423 merged commit 91840ce into master Apr 25, 2022
@mergify mergify bot deleted the opentelemtry-backend branch April 25, 2022 09:26
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.

Add a general opentelemetry backend
2 participants