Skip to content

Commit

Permalink
[cmd/mdatagen] Consolidate resource building
Browse files Browse the repository at this point in the history
Use the recently introduce ResourceBuilder in MetricsBuilder instead of generating separate logic. This consolidation will make all the future improvements to the ResourceBuilder applicable for craping receivers and resource processors. This also opens the door for getting away from the sequential ResourceMetrics building using EmitForResource towards better structured map-based approach.
  • Loading branch information
dmitryax committed Jul 24, 2023
1 parent 3f3817c commit 37f15c9
Show file tree
Hide file tree
Showing 325 changed files with 8,588 additions and 4,197 deletions.
15 changes: 15 additions & 0 deletions .chloggen/mdatagen-apply-resource-builder-on-metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Use this changelog template to create an entry for release notes.
# If your change doesn't affect end users, such as a test fix or a tooling change,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: cmd/mdatagen

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Simplify resource building in MetricsBuilder, suggest using ResourceBuilder instead.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [24443]
52 changes: 52 additions & 0 deletions cmd/mdatagen/internal/metadata/generated_config_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 8 additions & 57 deletions cmd/mdatagen/internal/metadata/generated_metrics.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 4 additions & 41 deletions cmd/mdatagen/internal/metadata/generated_metrics_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 71 additions & 0 deletions cmd/mdatagen/internal/metadata/generated_resource.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 64 additions & 0 deletions cmd/mdatagen/internal/metadata/generated_resource_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 37f15c9

Please sign in to comment.