Skip to content

receiver/prometheus/internal: augment metricFamilyPdata from big PR#5185

Closed
odeke-em wants to merge 1 commit into
open-telemetry:mainfrom
orijtech:recceiver-prometheus-update-internal-OTLP
Closed

receiver/prometheus/internal: augment metricFamilyPdata from big PR#5185
odeke-em wants to merge 1 commit into
open-telemetry:mainfrom
orijtech:recceiver-prometheus-update-internal-OTLP

Conversation

@odeke-em
Copy link
Copy Markdown
Member

@odeke-em odeke-em commented Sep 11, 2021

This change updates internal code and is meant to alleviate the
massive PR #5184 which is our eventual end-goal. No need for tests
because the code path isn't used so we have a license to update
it towards the end goal.

Particularly it:

Updates PR #5184

@odeke-em odeke-em requested review from a team and Aneurysm9 September 11, 2021 09:03
@odeke-em
Copy link
Copy Markdown
Member Author

Kindly cc-ing @Aneurysm9 @alolita @dashpole @tigrannajaryan to help with a +1

Copy link
Copy Markdown
Contributor

@dashpole dashpole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth updating the description to say what this does.

It adds open-telemetry/opentelemetry-collector#3116 to the otlp version.

It copies the sortPoints method over verbatim.

It sets type and name on pdata metrics.

This change updates internal code and is meant to alleviate the
massive PR #5184 which is our eventual end-goal. No need for tests
because the code path isn't used so we have a license to update
it towards the end goal.

Particularly it:
* adds open-telemetry/opentelemetry-collector#3116 to the otlp version.
* copies the sortPoints method over verbatim.
* sets DataType and Name on pdata metrics.

Updates PR #5184
@odeke-em odeke-em force-pushed the recceiver-prometheus-update-internal-OTLP branch from d404249 to 55560d6 Compare September 13, 2021 17:41
@odeke-em
Copy link
Copy Markdown
Member Author

Might be worth updating the description to say what this does.

It adds open-telemetry/opentelemetry-collector#3116 to the otlp version.

It copies the sortPoints method over verbatim.

It sets type and name on pdata metrics.

Done, thank you @dashpole!

Thank you @alolita @dashpole @cuonglm for the reviews and approvals! Kindly cc-ing @bogdandrutu @Aneurysm9 to help with a merge.


mtype := convToPdataMetricType(metadata.Type)
if mtype == pdata.MetricDataTypeNone {
logger.Debug(fmt.Sprintf("Invalid metric : %s %+v", metricName, metadata))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MetricName and metadata should fields not a dynamic string to allow for easier searching in logging systems.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also question the value of having the log statement here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in the original code

ocaMetricType := convToOCAMetricType(metadata.Type)
if ocaMetricType == metricspb.MetricDescriptor_UNSPECIFIED {
logger.Debug(fmt.Sprintf("Invalid metric : %s %+v", metricName, metadata))
}

this code is a port. @MovieStoreGuy I appreciate the enthusiasm but the context here is that I am porting over code, which requires careful parity changes; you can file bugs for improvements but these PRs am sending are for porting over code.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've opened a followup issue here #5720, can this comment be resolved @MovieStoreGuy?

@github-actions
Copy link
Copy Markdown
Contributor

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

@github-actions
Copy link
Copy Markdown
Contributor

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 8, 2021

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

@codeboten
Copy link
Copy Markdown
Contributor

@odeke-em please resolve the conflict

@bogdandrutu
Copy link
Copy Markdown
Member

@odeke-em any plans to update this PR? Otherwise we should close it.

@github-actions
Copy link
Copy Markdown
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions Bot closed this Oct 27, 2021
hex1848 pushed a commit to hex1848/opentelemetry-collector-contrib that referenced this pull request Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants