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

Proposal: Dynamic configuration of metrics #209

Open
tttoad opened this issue Jul 16, 2022 · 2 comments
Open

Proposal: Dynamic configuration of metrics #209

tttoad opened this issue Jul 16, 2022 · 2 comments

Comments

@tttoad
Copy link

tttoad commented Jul 16, 2022

This OTEP is to add support for parsing request information to generate metrics.
Some business-related metrics need to be generated by parsing the request information (e.g., request body, header, response body).

For example.
Counting the number of active users per minute.
The configuration could be as follows.

{
	"service": "user-center",
	"config": [{
		"name": "request",
		"key": "user",
		"interval": "60s",
		"type": "counter"
	}]
}

Provide a method for end users to pass in request information.
Parse the request information, record the number of times the user field appears and report it once per minute.

I want this configuration to be stored on the remote server, and the client can listen to changes in the configuration to turn on or off the reporting of metrics.
The end user can enable data collection for a metric at any time for the information in the request.
This could be the number of successful or failed requests, the number of requests with a delay greater than 3ms, or the number of requests with the key equal to user.
If the open-telemetry group is interested, I can provide a preliminary design and implementation.

@tttoad tttoad changed the title Dynamic configuration of metrics Proposal: Dynamic configuration of metrics Jul 16, 2022
@jmacd
Copy link
Contributor

jmacd commented Jul 29, 2022

Given the existing metrics Views SDK specification supports the kind of query used in your example, this appears to be a request for dynamic configuration of the SDK for Views.

Possibly related, need for a file-format-level encoding of Views: open-telemetry/opentelemetry-specification#1773

Possibly related, Jaeger remote sampling configuration mechanism.

@tttoad tttoad closed this as completed Aug 1, 2022
@tttoad tttoad reopened this Aug 1, 2022
@tttoad
Copy link
Author

tttoad commented Aug 1, 2022

Given the existing metrics Views SDK specification supports the kind of query used in your example, this appears to be a request for dynamic configuration of the SDK for Views.

Possibly related, need for a file-format-level encoding of Views: open-telemetry/opentelemetry-specification#1773

Possibly related, Jaeger remote sampling configuration mechanism.

Yes, I would like to define the specification for remote dynamic configuration distribution.

I'm not sure if there is currently a feature to automatically parse the request and response parameters to generate metrics.
If this feature is available, I would like to add a configuration about it.
just like

{
	"service": "user-center",
	"config": [{
		"name": "request", // or response 
		"key": "user",  
		"interval": "60s",
		"type": "counter" // or updown , gauge
	}]
}

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

No branches or pull requests

2 participants