forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore][receivercreator] docs: add data type to endpoints variables (o…
…pen-telemetry#31407) **Description:** Adding data type to endpoints(pod/port/node/...) variables in the readme doc. The reason why I'd like to do this is, I tried to use the receiver creator to scrape metrics with prometheus receiver and the configuration is like: ``` receiver_creator/1: receivers: prometheus_simple/app_pods: rule: type == "port" && pod.annotations["prometheus.io/scrape"] == "true" && ( port == pod.annotations["prometheus.io/port"] || name == pod.annotations["prometheus.io/port"] ) config: endpoint: '`endpoint`' metrics_path: '`"prometheus.io/path" in pod.annotations ? pod.annotations["prometheus.io/path"] : "/metrics"`' collection_interval: '`"prometheus.io/collection_interval" in pod.annotations ? pod.annotations["prometheus.io/collection_interval"] : "10s"`' ``` I made a silly mistake here in `port == pod.annotations["prometheus.io/port"]`, I ignored the data type of `port` variable and it took me a while to fix it. So I think it will help others and avoid such kinds of mistakes to add the data types in readme.
- Loading branch information
1 parent
5986fb2
commit 5eb5da0
Showing
1 changed file
with
68 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters