Skip to content

Commit d639ebe

Browse files
committed
feat(otelcol)!: Remove unsupported labels attribute from gcp block
1 parent d9e0be5 commit d639ebe

2 files changed

Lines changed: 0 additions & 10 deletions

File tree

docs/sources/reference/components/otelcol/otelcol.processor.resourcedetection.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -522,12 +522,6 @@ Use the `gcp` detector regardless of the GCP platform {{< param "PRODUCT_NAME" >
522522
[Google Cloud Client Libraries for Go]: https://github.com/googleapis/google-cloud-go
523523
[GCP metadata server]: https://cloud.google.com/compute/docs/storing-retrieving-metadata
524524

525-
The `gcp` block supports the following attributes:
526-
527-
| Attribute | Type | Description | Default | Required |
528-
|-----------|----------------|-----------------------------------------------------------------------------------------------|---------|----------|
529-
| `labels` | `list(string)` | A list of regular expressions to match GCE instance label keys to add as resource attributes. | `[]` | no |
530-
531525
The `gcp` block supports the following blocks:
532526

533527
| Block | Description | Required |

internal/component/otelcol/processor/resourcedetection/internal/gcp/config.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ import (
88
const Name = "gcp"
99

1010
type Config struct {
11-
// Labels is a list of regex's to match GCE instance label keys that users want
12-
// to add as resource attributes to processed data.
13-
Labels []string `alloy:"labels,attr,optional"`
1411
ResourceAttributes ResourceAttributesConfig `alloy:"resource_attributes,block,optional"`
1512
}
1613

@@ -49,7 +46,6 @@ func (args *Config) SetToDefault() {
4946

5047
func (args Config) Convert() map[string]any {
5148
return map[string]any{
52-
"labels": args.Labels,
5349
"resource_attributes": args.ResourceAttributes.Convert(),
5450
}
5551
}

0 commit comments

Comments
 (0)