Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
  • Loading branch information
pokgak and ArthurSens committed Nov 9, 2024
1 parent 0e3b184 commit 810c216
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .chloggen/35003-deprecate-export_created_metric.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ change_type: deprecation
component: exporter/prometheusremotewrite

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: deprecate export_created metric
note: Deprecate configuration option `export_created metric`

# One or more tracking issues or pull requests related to the change
issues: [35003]
Expand Down
2 changes: 1 addition & 1 deletion exporter/prometheusremotewriteexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The following settings can be optionally configured:
- `enabled` (default = false): If `enabled` is `true`, all the resource attributes will be converted to metric labels by default.
- `target_info`: customize `target_info` metric
- `enabled` (default = true): If `enabled` is `true`, a `target_info` metric will be generated for each resource metric (see https://github.com/open-telemetry/opentelemetry-specification/pull/2381).
- `export_created_metric` (deprecated):
- `export_created_metric`: `WARNING` Deprecated and planned for removal in v0.116.0. See [related issue](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/35003) for more information.
- `enabled` (default = false): If `enabled` is `true`, a `_created` metric is
exported for Summary, Histogram, and Monotonic Sum metric points if
`StartTimeUnixNano` is set.
Expand Down
3 changes: 2 additions & 1 deletion exporter/prometheusremotewriteexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ type Config struct {
TargetInfo *TargetInfo `mapstructure:"target_info,omitempty"`

// CreatedMetric allows customizing creation of _created metrics
// Deprecated: This feature is useless in PRWv1 and and PRWv2 already have the created timestamp in the proto
// Deprecated[0.114.0]: The feature doesn't provide the expected behavior. Use Prometheus remote-write v2 to enable sending Created Timestamps.
// This feature is planned to be removed in v0.116.0
CreatedMetric *CreatedMetric `mapstructure:"export_created_metric,omitempty"`

// AddMetricSuffixes controls whether unit and type suffixes are added to metrics on export
Expand Down

0 comments on commit 810c216

Please sign in to comment.