-
Notifications
You must be signed in to change notification settings - Fork 4
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
Minimal working version #3
Conversation
0c70256
to
c40a57c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General question, do we expect to start delta or cumulative mode? Or both?
pkg/opentelemetry/output.go
Outdated
@@ -36,47 +52,198 @@ func New(p output.Params) (*Output, error) { | |||
|
|||
// Description returns a human-readable description of the output that will be shown in `k6 run` | |||
func (o *Output) Description() string { | |||
return "OpenTelemetry: " + o.config.Address | |||
return "opentelemetry: " + o.config.String() | |||
} | |||
|
|||
// Stop flushes all remaining metrics and finalizes the test run | |||
func (o *Output) Stop() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func (o *Output) Stop() error { | |
func (o *Output) StopWithTestError() error { |
We should implement StopWithTestError instead of Stop(). Stop should just proxy the request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I'm getting the idea or maybe missing the context; Stop
is part of the interface. StopWithTestError
is planned to replace Stop
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch then, I'll adjust accordingly 👍
} | ||
|
||
// Stop flushes all remaining metrics and finalizes the test run | ||
func (o *Output) Stop() error { | ||
o.logger.Debug("Stopping...") | ||
defer o.logger.Debug("Stopped!") | ||
|
||
if err := o.meterProvider.Shutdown(context.Background()); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider forcing a timeout here? Or do we rely on the fact that the client will have one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could introduce a configuration in a later PRs 👍
c40a57c
to
a477b15
Compare
@codebien If possible, we could make this configurable, so probably both. However, the default behavior should be close to most of the other k6 outputs. |
a477b15
to
2bc64c6
Compare
It has limited support of metric types (count, gauge, trend(?)). Only gRPC receiver. Limited configuration.
2bc64c6
to
39d991c
Compare
What?
It's the first minimum working version that actually sends metrics to an OTEl receiver.
It has limited support of metric types (count, gauge, trend(?)). Only gRPC receiver. Limited configuration.
Why?
An iterative approach to reduce the scope of the PRs.
Dependent on #2
Part of #1