Skip to content

Conversation

@iRevive
Copy link
Contributor

@iRevive iRevive commented Sep 12, 2024

Here is an example of the 'semantic conventions tests'.

@iRevive iRevive requested a review from NthPortal September 12, 2024 17:34
.upDownCounter[Long](s"http.$kind.active_requests")
.withUnit("{request}")
.withDescription("Number of active HTTP requests.")
.withDescription(s"Number of active HTTP $kind requests.")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We've spotted the first mismatch 🥳

@iRevive
Copy link
Contributor Author

iRevive commented Sep 12, 2024

The current implementation of the MetricOps is rather limiting and we cannot comply the spec.

I don't think we should make drastic changes to 0.23, but we can to 1.0.x: http4s/http4s#7491.

@NthPortal
Copy link
Contributor

it seems I'll need to poke at updating the implementations of the tracing middlewares to be correct

@iRevive iRevive force-pushed the feature/semantic-testing branch from f52eb1d to 6497001 Compare September 24, 2024 17:06
@NthPortal NthPortal force-pushed the feature/semantic-testing branch from 6497001 to 904b670 Compare October 8, 2024 15:30
@NthPortal
Copy link
Contributor

@iRevive I rebased, fixed the conflicts, and force pushed. how do you want to proceed given that the current implementation from 0.23.x doesn't support some attributes? should we add logic to specifically skip the checks for those attributes and add a TODO comment to fix it in a later release? should we wait until we actually have a compliant implementation to fix it? something else?

I don't think we should make drastic changes to 0.23, but we can to 1.0.x

it should be possible to do it in a binary compatible way in 0.23.x, though it would be a pain. but would it be worth it anyway, as it may yet be many years until 1.0.x is released?

@iRevive
Copy link
Contributor Author

iRevive commented Oct 8, 2024

should we wait until we actually have a compliant implementation to fix it?

I think it would be the easiest option for us.

@NthPortal
Copy link
Contributor

@iRevive are the equivalent semantic tests for tracing? also, the fix to the counter description should probably get its own PR so it can be merged

@iRevive
Copy link
Contributor Author

iRevive commented Jan 20, 2025

@NthPortal no, there is no such testing for traces, unfortunately.

the fix to the counter description should probably get its own PR so it can be merged

I will make a PR.

@NthPortal
Copy link
Contributor

@iRevive I discovered from #177 that http4s has types suffixed with numbers (such as WebSocketBuilder2) from when new, incompatible APIs needed to be introduced in a binary-compatible manner because the old APIs were bad or insufficient. it may be possible and worthwhile to introduce a MetricsOps2 to http4s to support the needs of otel4s (and potentially other telemetry libraries, but primarily otel4s)

@iRevive
Copy link
Contributor Author

iRevive commented Mar 26, 2025

it may be possible and worthwhile to introduce a MetricsOps2 to http4s to support the needs of otel4s

That would be nice. Maybe we can reuse some ideas from my PoC branch: http4s/http4s#7491

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.

2 participants