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 #4303

Closed
tttoad opened this issue Jul 16, 2022 · 4 comments
Closed

Proposal: Dynamic configuration of metrics #4303

tttoad opened this issue Jul 16, 2022 · 4 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: #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
	}]
}

@trask trask transferred this issue from open-telemetry/oteps Nov 19, 2024
@trask
Copy link
Member

trask commented Nov 19, 2024

(transferred to specification repository as part of #4284)

@jpkrohling jpkrohling added the triage:deciding:tc-inbox Needs attention from the TC in order to move forward label Nov 25, 2024
@jack-berg
Copy link
Member

I'm not sure if there is currently a feature to automatically parse the request and response parameters to generate metrics.

This seems to be in the purview of instrumentation, not the SDK. The metrics SDK isn't concerned with or aware of HTTP requests and responses, or other domain specific concepts. Its more abstract and lower level.

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

Remote configuration is within the scope of the SDK, and is being (loosely) discussed in the OpAmp and Config SIGs (see listing of SIGs here). But it doesn't really matter that the SDK is remotely configurable if it doesn't contain the feature you're trying to remotely configure.

Given the age of this issue, I'm going to close. Please feel free to re-open and clarify how the request would impact the specification.

@jack-berg jack-berg removed the triage:deciding:tc-inbox Needs attention from the TC in order to move forward label Dec 4, 2024
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

5 participants