-
Notifications
You must be signed in to change notification settings - Fork 119
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
OtelFiber: Use tracetest #657
OtelFiber: Use tracetest #657
Conversation
@emanuelef Can you rebase, and remove 1.18.x from the otelfiber test suite |
Sure, but will that mean 1.18 is no longer supported in all the tests ? |
Only remove it for |
Oh, I see what you mean... The |
pls increate the major number in the go.mod version https://github.com/gofiber/contrib/blob/main/otelfiber/go.mod#L1 module github.com/gofiber/contrib/otelfiber/v2 |
Indeed, changing that will drop 1.18 testing for all the others. Should we split the test action ? But I guess in case that would be another PR. |
I'm thinking whats the best solution for this. In the storage repo every module has a separate file. We may need to do that for |
@emanuelef can you resolve the conflicts with the master and add the "v2" prefix in the go.mod file like here |
Some questions:
|
yes the release notes for the tag
each test workflow has its own defined golang versions, so should not be a problem
if that is possible and you can do that, gladly
is it conceivable that these are used outside? Then yes, otherwise I would not expose them |
so I guess the only reason for v2 is that minimum Go version is now 1.19 ? |
@gaby can you comment on that ? I can see the GH action is the same for all the other middlewares.
|
good point, we need to split the test workflows like in the storage repository otherwise we would customize the golang version for all contrib packages, but we don't want to do that |
@emanuelef @ReneWerner87 I can do a separate PR to separate all the tests, then we can update this PR? |
ok |
@emanuelef Test changes have been merged, you can rebase now :-) |
@gaby I rebased and removed 1.18 from test-otelfiber.yml, but I can see 1.18 test still triggered. I might be missing something. |
ok, I've just had to delete test.yml in my PR. |
Before closing, do we want to create a module just for the test to avoid including the tracetest dependency ? |
@ReneWerner87 is this PR not going to be merged because of the breaking changes ? |
sorry had been waiting for the changes for the test workflow and module and then lost focus for this pull request |
SA1019: "go.opentelemetry.io/otel/oteltest" is deprecated: This package contains an alternate implementation of the OpenTelemetry SDK. This means it will diverge from the one commonly used in real world operations and therefore will not provide adequate testing guarantees for users. Because of this, this package should not be used to test performance or behavior of code running OpenTelemetry. Instead, the SpanRecorder from the go.opentelemetry.io/otel/sdk/trace/tracetest package can be registered with the default SDK (go.opentelemetry.io/otel/sdk/trace) as a SpanProcessor and used to test. This will ensure code will work with the default SDK. If users do not want to include a dependency on the default SDK it is recommended to run integration tests in their own module to isolate the dependency (see go.opentelemetry.io/otel/bridge/opencensus/test as an example).
https://pkg.go.dev/go.opentelemetry.io/otel/oteltest
This is the approach to use if moving to go.opentelemetry.io/otel/sdk/trace/tracetest
https://github.com/open-telemetry/opentelemetry-go/tree/main/bridge/opencensus/test