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

[metrics_generation_processor] Add metrics generation logic #3433

Merged

Conversation

hossain-rayhan
Copy link
Contributor

Description:
This PR adds the actual metrics generation logic based on configured rules in the experimental_metrics_generation processor.

Link to tracking Issue:
#2722

Testing:
Manually tested.
I am adding unit tests to improve coverage. Created the PR to have some early feedback.

Documentation:
README updated.

@hossain-rayhan hossain-rayhan requested a review from a team May 19, 2021 22:10
processor/metricsgenerationprocessor/processor.go Outdated Show resolved Hide resolved
processor/metricsgenerationprocessor/processor.go Outdated Show resolved Hide resolved
processor/metricsgenerationprocessor/utils.go Show resolved Hide resolved
processor/metricsgenerationprocessor/processor.go Outdated Show resolved Hide resolved
processor/metricsgenerationprocessor/utils.go Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2021

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jun 1, 2021
@hossain-rayhan
Copy link
Contributor Author

Will address the PR feedbacks.

@github-actions github-actions bot removed the Stale label Jun 2, 2021
@hossain-rayhan
Copy link
Contributor Author

hossain-rayhan commented Jun 4, 2021

Need to improve unit test coverage. Do not merge.

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jun 12, 2021
@bogdandrutu
Copy link
Member

@hossain-rayhan did you improve the unit-tests? Looks like this is on you

@tigrannajaryan
Copy link
Member

I marking as draft since the author intends to add unit tests.

@tigrannajaryan tigrannajaryan marked this pull request as draft June 16, 2021 14:31
@hossain-rayhan
Copy link
Contributor Author

Sorry, I was little bit distracted. Yes, I am back on this. Will send the update soon. Thanks @bogdandrutu and @tigrannajaryan

@github-actions github-actions bot removed the Stale label Jun 17, 2021
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jun 25, 2021
@hossain-rayhan
Copy link
Contributor Author

Ahh, this one is also on me! Couldn't prioritize this week. Sorry for the delay and I am taking all the blames. Hopefully I will update the PR early Monday.

@github-actions github-actions bot removed the Stale label Jun 26, 2021
Signed-off-by: Rayhan Hossain <[email protected]>
@hossain-rayhan
Copy link
Contributor Author

Hi @bogdandrutu, finally I finished adding unit tests and improve coverage for my code here. Would you please take a look?

Also, I am not sure if I have the permission to change the status from Draft to Open. @tigrannajaryan can you please help here.

@tigrannajaryan tigrannajaryan marked this pull request as ready for review June 29, 2021 15:48
@bogdandrutu bogdandrutu merged commit e46c311 into open-telemetry:main Jun 30, 2021
alexperez52 referenced this pull request in open-o11y/opentelemetry-collector-contrib Aug 18, 2021
dmitryax pushed a commit that referenced this pull request Sep 30, 2024
…alculations (#35428)

**Description:** 
The metrics generation processor would previously hit a panic when the
calculation rule was operating on a `sum` metric, instead of a `gauge`.
The [component
proposal](#2722),
[initial
implementation](#3433),
nor the
[README](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricsgenerationprocessor)
state that it's a requirement for the metric to be a `gauge`, nor do I
think this requirement makes sense.

I've updated the logic to account for sum metrics being used and added a
test.

**Testing:** 
Added a test for this situation, the test panics before the change and
passes after.
jriguera pushed a commit to springernature/opentelemetry-collector-contrib that referenced this pull request Oct 4, 2024
…alculations (open-telemetry#35428)

**Description:** 
The metrics generation processor would previously hit a panic when the
calculation rule was operating on a `sum` metric, instead of a `gauge`.
The [component
proposal](open-telemetry#2722),
[initial
implementation](open-telemetry#3433),
nor the
[README](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricsgenerationprocessor)
state that it's a requirement for the metric to be a `gauge`, nor do I
think this requirement makes sense.

I've updated the logic to account for sum metrics being used and added a
test.

**Testing:** 
Added a test for this situation, the test panics before the change and
passes after.
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

Successfully merging this pull request may close these issues.

6 participants