From 4d38785bbd895ebad782229704764acced7d73d5 Mon Sep 17 00:00:00 2001 From: Brian Conn Date: Thu, 26 Sep 2024 13:50:12 -0400 Subject: [PATCH 1/2] Fix a GitHub Scraper comment typo (#35321) Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- .../githubreceiver/internal/scraper/githubscraper/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/receiver/githubreceiver/internal/scraper/githubscraper/config.go b/receiver/githubreceiver/internal/scraper/githubscraper/config.go index 54b1f2e73b79..c8b767b97c29 100644 --- a/receiver/githubreceiver/internal/scraper/githubscraper/config.go +++ b/receiver/githubreceiver/internal/scraper/githubscraper/config.go @@ -15,7 +15,7 @@ type Config struct { metadata.MetricsBuilderConfig `mapstructure:",squash"` confighttp.ClientConfig `mapstructure:",squash"` internal.ScraperConfig - // GitHubOrg is the name of the GitHub organization to srape (github scraper only) + // GitHubOrg is the name of the GitHub organization to scrape (github scraper only) GitHubOrg string `mapstructure:"github_org"` // SearchQuery is the query to use when defining a custom search for repository data SearchQuery string `mapstructure:"search_query"` From 568ada314d0b47fdd568e4d8206e290410c54f55 Mon Sep 17 00:00:00 2001 From: Christos Markou Date: Thu, 26 Sep 2024 21:10:04 +0300 Subject: [PATCH 2/2] improve receiver_creator and k8sobserver docs (#35323) **Description:** This PR includes the `k8s.ingress` type in the list of supported types and adds a note in `k8sobserver`'s back to the `receiver_creator`'s docs so as users can find more extensive configuration examples. **Link to tracking Issue:** Fixes https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/34740 --------- Signed-off-by: ChrsMark --- extension/observer/k8sobserver/README.md | 3 +++ receiver/receivercreator/README.md | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/extension/observer/k8sobserver/README.md b/extension/observer/k8sobserver/README.md index 9375a7a02efd..29c4e8c9af34 100644 --- a/extension/observer/k8sobserver/README.md +++ b/extension/observer/k8sobserver/README.md @@ -73,3 +73,6 @@ All fields are optional. | observe_nodes | bool | `false` | Whether to report observer k8s.node endpoints. If `true` and `node` is specified it will only discover node endpoints whose `metadata.name` matches the provided node name. If `true` and `node` isn't specified, it will discover all available node endpoints. Please note that Collector connectivity to nodes is dependent on your cluster configuration and isn't guaranteed.| | observe_services | bool | `false` | Whether to report observer k8s.service endpoints.| | observe_ingresses | bool | `false` | Whether to report observer k8s.ingress endpoints.| + +More complete configuration examples on how to use this observer along with the `receiver_creator`, +can be found at the [Receiver Creator](../../../receiver/receivercreator/README.md)'s documentation. \ No newline at end of file diff --git a/receiver/receivercreator/README.md b/receiver/receivercreator/README.md index 971b7e95c9d4..4099660c42ff 100644 --- a/receiver/receivercreator/README.md +++ b/receiver/receivercreator/README.md @@ -133,6 +133,12 @@ None | k8s.node.name | \`name\` | | k8s.node.uid | \`uid\` | +`type == "k8s.ingress"` + +| Resource Attribute | Default | +|--------------------|-------------------| +| k8s.namespace.name | \`namespace\` | + See `redis/2` in [examples](#examples). @@ -149,7 +155,7 @@ Similar to the per-endpoint type `resource_attributes` described above but for i ## Rule Expressions -Each rule must start with `type == ("pod"|"port"|"hostport"|"container"|"k8s.service"|"k8s.node") &&` such that the rule matches +Each rule must start with `type == ("pod"|"port"|"hostport"|"container"|"k8s.service"|"k8s.node"|"k8s.ingress") &&` such that the rule matches only one endpoint type. Depending on the type of endpoint the rule is targeting it will have different variables available.