Repository navigation
release: 1.7.1 - #264
Merged
Merged
release: 1.7.1#264
Conversation
release: 1.7.0 back to develop
…ics are exported (#257) Nothing kept the SDK providers Start built, so nothing could flush them: a stop dropped the spans still in the batch and the metrics since the last interval (60s), and a short job could exit before its first export. The factory now keeps both providers and exposes Shutdown(ctx), which flushes and stops them at once (one export timeout, not two) and is final: a later Start only warns. The fx module calls it from an OnStop hook and logs a failure instead of returning it, so an unreachable collector does not turn a successful run into exit code 1. oteltest.Collector is an in-process OTLP/gRPC collector, so tests can assert what really reached the exporter instead of dialing localhost:4317.
fix(otel): shut the providers down on stop so the last spans and metrics are exported (#257)
…ses otel (#256) An app generated by builder could list the otel plugin on a server, the opentelemetry middleware on a function or the otel plugin on a client, and still export nothing: no generated module started the OpenTelemetry providers, so every plugin reported to the noop global provider. The door of a server that lists otel (rest, mcp, the cloudevents adapter), the door of a function that runs the opentelemetry middleware and the module of a client built with the otel plugin (resty, redis, mongo, sql) now include otelfx.Module(), which starts the providers on boot and shuts them down on stop. The module is once-guarded, so an app with several such doors starts them once. The builder example builds its warehouse client with otel and tests that the span of the call reaches a collector with the trace context sent on; examples/stock tests that the worker exports the span of an event.
fix(builder,inject): start the OTel providers when a door or client uses otel (#256)
…n context (#262) The cloudevents_http command served on context.Background(), so its receiver never returned: on SIGTERM the OnStop of the function module waited the whole fx stop timeout (15s) and the app exited 1 with "Failed to stop cleanly: context deadline exceeded". It now runs RunContext(cmd.Context(), ...): when the app stops it takes no new request, shuts its server down once the events in hand are answered and returns, so the worker exits 0 at once. The handler runs with a context the stop does not cancel, so the event it holds finishes. A protocol option that fails now fails Run instead of a nil protocol. Run is deprecated in favour of RunContext. The generated main of examples/stock worker gets a test that sends SIGTERM after a reservation and requires exit 0 within two seconds.
fix(bootstrap/function): the cloudevents http adapter stops on the run context (#262)
Bumps the version shown in README and site: generated apps start and shut down the OpenTelemetry providers, and the cloudevents http adapter stops on SIGTERM, since 1.7.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Patch release from develop (milestone 1.7.1: #256, #257, #262).
Only the version in README and site changes on this branch.