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

Add instance annotations to data_dir_size_bytes metric #5046

Merged
merged 2 commits into from
Jun 10, 2024

Conversation

esevastyanov
Copy link
Contributor

No description provided.

@esevastyanov esevastyanov marked this pull request as ready for review June 10, 2024 11:27
Comment on lines 544 to 547
// Add instance annotations as attributes to pass organization id, project id, etc.
for k, v := range inst.Annotations {
attrs = append(attrs, attribute.String(k, v))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using instanceAnnotationsToAttribs to avoid duplicated logic

attribute.String("instance_id", inst.ID),
attribute.String("updated_on", inst.UpdatedOn.Format(time.RFC3339)),
)
attribute.String("updated_on", inst.UpdatedOn.Format(time.RFC3339)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's omit this – it made sense for the wide events, but not really for metrics events (would be a separate metric if anything)

@begelundmuller begelundmuller merged commit 56b546c into main Jun 10, 2024
4 checks passed
@begelundmuller begelundmuller deleted the heartbeat-inst-annotations branch June 10, 2024 12:14
esevastyanov added a commit that referenced this pull request Jun 10, 2024
* Add instance annotations to data_dir_size_bytes metric

* instanceAnnotationsToAttribs

(cherry picked from commit 56b546c)
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.

2 participants