Skip to content

fix servicegraph failed to find dimensions#1

Merged
JaredTan95 merged 2 commits into
insight-mainfrom
service_graph_fix
Nov 13, 2022
Merged

fix servicegraph failed to find dimensions#1
JaredTan95 merged 2 commits into
insight-mainfrom
service_graph_fix

Conversation

@Frapschen

Copy link
Copy Markdown

Description: fix servicegraph failed to find dimensions

@JaredTan95 JaredTan95 merged commit 973b2a0 into insight-main Nov 13, 2022
@JaredTan95 JaredTan95 deleted the service_graph_fix branch November 13, 2022 09:14
JaredTan95 pushed a commit that referenced this pull request Dec 22, 2022
* fix servicegraph failed to find dimensions

* fix
JaredTan95 pushed a commit that referenced this pull request Aug 2, 2023
…emetry#24676)

**Description:** The metadata.yml for the SSH check receiver currently
documents a resource attribute containing the SSH endpoint but this is
not emitted. This PR updates the receiver to include this resource
attribute.

**Link to tracking Issue:** open-telemetry#24441 

**Testing:**

Example collector config:
```yaml
receivers:
  sshcheck:
    endpoint: 13.245.150.131:22
    username: ec2-user
    key_file: /Users/dewald.dejager/.ssh/sandbox.pem
    collection_interval: 15s
    known_hosts: /Users/dewald.dejager/.ssh/known_hosts
    ignore_host_key: false
    resource_attributes:
      "ssh.endpoint":
        enabled: true

exporters:
  logging:
    verbosity: detailed
  prometheus:
    endpoint: 0.0.0.0:8081
    resource_to_telemetry_conversion:
      enabled: true

service:
  pipelines:
    metrics:
      receivers: [sshcheck]
      exporters: [logging, prometheus]
```

The log output looks like this:
```
2023-07-30T16:52:38.724+0200    info    MetricsExporter {"kind": "exporter", "data_type": "metrics", "name": "logging", "resource metrics": 1, "metrics": 2, "data points": 2}
2023-07-30T16:52:38.724+0200    info    ResourceMetrics #0
Resource SchemaURL: 
Resource attributes:
     -> ssh.endpoint: Str(13.245.150.131:22)
ScopeMetrics #0
ScopeMetrics SchemaURL: 
InstrumentationScope otelcol/sshcheckreceiver 0.82.0-dev
Metric #0
Descriptor:
     -> Name: sshcheck.duration
     -> Description: Measures the duration of SSH connection.
     -> Unit: ms
     -> DataType: Gauge
NumberDataPoints #0
StartTimestamp: 2023-07-30 14:52:22.381672 +0000 UTC
Timestamp: 2023-07-30 14:52:38.404003 +0000 UTC
Value: 319
Metric #1
Descriptor:
     -> Name: sshcheck.status
     -> Description: 1 if the SSH client successfully connected, otherwise 0.
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: false
     -> AggregationTemporality: Cumulative
NumberDataPoints #0
StartTimestamp: 2023-07-30 14:52:22.381672 +0000 UTC
Timestamp: 2023-07-30 14:52:38.404003 +0000 UTC
Value: 1
```

And the Prometheus metrics look like this:
```
# HELP sshcheck_duration Measures the duration of SSH connection.
# TYPE sshcheck_duration gauge
sshcheck_duration{ssh_endpoint="13.245.150.131:22"} 311
# HELP sshcheck_status 1 if the SSH client successfully connected, otherwise 0.
# TYPE sshcheck_status gauge
sshcheck_status{ssh_endpoint="13.245.150.131:22"} 1
```
JaredTan95 pushed a commit that referenced this pull request Aug 17, 2023
)

**Description:** 

Adding command line argument `--status-code` to `telemetrygen traces`,
which accepts `(Unset,Error,Ok)` (case sensitive) or the enum equivalent
of `(0,1,2)`.

Running 

```shell
telemetrygen traces --otlp-insecure --traces 1 --status-code 1
```

against a minimal local collector yields

```txt
2023-07-29T21:27:57.862+0100	info	ResourceSpans #0
Resource SchemaURL: https://opentelemetry.io/schemas/1.4.0
Resource attributes:
     -> service.name: Str(telemetrygen)
ScopeSpans #0
ScopeSpans SchemaURL:
InstrumentationScope telemetrygen
Span #0
    Trace ID       : f6dc4be32c78b9999c69d504a79e68c1
    Parent ID      : 4e2cd6e0e90cf2ea
    ID             : 20835413e32d26a5
    Name           : okey-dokey
    Kind           : Server
    Start time     : 2023-07-29 20:27:57.861602 +0000 UTC
    End time       : 2023-07-29 20:27:57.861726 +0000 UTC
    Status code    : Error
    Status message :
Attributes:
     -> net.peer.ip: Str(1.2.3.4)
     -> peer.service: Str(telemetrygen-client)
Span #1
    Trace ID       : f6dc4be32c78b9999c69d504a79e68c1
    Parent ID      :
    ID             : 4e2cd6e0e90cf2ea
    Name           : lets-go
    Kind           : Client
    Start time     : 2023-07-29 20:27:57.861584 +0000 UTC
    End time       : 2023-07-29 20:27:57.861726 +0000 UTC
    Status code    : Error
    Status message :
Attributes:
     -> net.peer.ip: Str(1.2.3.4)
     -> peer.service: Str(telemetrygen-server)
```

and similarly (the string version)

```shell
telemetrygen traces --otlp-insecure --traces 1 --status-code '"Ok"'
```

produces 

```txt
Resource SchemaURL: https://opentelemetry.io/schemas/1.4.0
Resource attributes:
     -> service.name: Str(telemetrygen)
ScopeSpans #0
ScopeSpans SchemaURL:
InstrumentationScope telemetrygen
Span #0
    Trace ID       : dfd830da170acfe567b12f87685d7917
    Parent ID      : 8e15b390dc6a1ccc
    ID             : 165c300130532072
    Name           : okey-dokey
    Kind           : Server
    Start time     : 2023-07-29 20:29:16.026965 +0000 UTC
    End time       : 2023-07-29 20:29:16.027089 +0000 UTC
    Status code    : Ok
    Status message :
Attributes:
     -> net.peer.ip: Str(1.2.3.4)
     -> peer.service: Str(telemetrygen-client)
Span #1
    Trace ID       : dfd830da170acfe567b12f87685d7917
    Parent ID      :
    ID             : 8e15b390dc6a1ccc
    Name           : lets-go
    Kind           : Client
    Start time     : 2023-07-29 20:29:16.026956 +0000 UTC
    End time       : 2023-07-29 20:29:16.027089 +0000 UTC
    Status code    : Ok
    Status message :
Attributes:
     -> net.peer.ip: Str(1.2.3.4)
     -> peer.service: Str(telemetrygen-server)
```

The default is `Unset` which is the current behaviour.

**Link to tracking Issue:**

24286

**Testing:**

Added unit tests which covers both valid and invalid inputs.

**Documentation:**

Command line arguments are self documenting via the usage info in the
flag.

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
JaredTan95 pushed a commit that referenced this pull request Nov 23, 2023
open-telemetry#29116)

**Description:** 

As originally proposed in open-telemetry#26991 before I got distracted

Exposes the duration of generated spans as a command line parameter. It
uses a `DurationVar` flag so units can be easily provided and are
automatically applied.

Example usage:

```bash
telemetrygen traces --traces 100 --otlp-insecure --span-duration 10ns # nanoseconds
telemetrygen traces --traces 100 --otlp-insecure --span-duration 10us # microseconds
telemetrygen traces --traces 100 --otlp-insecure --span-duration 10ms # milliseconds
telemetrygen traces --traces 100 --otlp-insecure --span-duration 10s # seconds
```

**Testing:** 

Ran without the argument provided `telemetrygen traces --traces 1
--otlp-insecure` and seen spans publishing with the default value.

Ran again with the argument provided: `telemetrygen traces --traces 1
--otlp-insecure --span-duration 1s`

And observed the expected output:

```
Resource SchemaURL: https://opentelemetry.io/schemas/1.4.0
Resource attributes:
     -> service.name: Str(telemetrygen)
ScopeSpans #0
ScopeSpans SchemaURL: 
InstrumentationScope telemetrygen 
Span #0
    Trace ID       : 8b441587ffa5820688b87a6b511d634c
    Parent ID      : 39faad428638791b
    ID             : 88f0886894bd4ee2
    Name           : okey-dokey
    Kind           : Server
    Start time     : 2023-11-12 02:05:07.97443 +0000 UTC
    End time       : 2023-11-12 02:05:08.97443 +0000 UTC
    Status code    : Unset
    Status message : 
Attributes:
     -> net.peer.ip: Str(1.2.3.4)
     -> peer.service: Str(telemetrygen-client)
Span #1
    Trace ID       : 8b441587ffa5820688b87a6b511d634c
    Parent ID      : 
    ID             : 39faad428638791b
    Name           : lets-go
    Kind           : Client
    Start time     : 2023-11-12 02:05:07.97443 +0000 UTC
    End time       : 2023-11-12 02:05:08.97443 +0000 UTC
    Status code    : Unset
    Status message : 
Attributes:
     -> net.peer.ip: Str(1.2.3.4)
     -> peer.service: Str(telemetrygen-server)
	{"kind": "exporter", "data_type": "traces", "name": "debug"}
```

**Documentation:** No documentation added.

---------

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
JaredTan95 pushed a commit that referenced this pull request Jun 5, 2024
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
This PR implements the new container logs parser as it was proposed at
open-telemetry#31959.

**Link to tracking Issue:** <Issue number if applicable>
open-telemetry#31959

**Testing:** <Describe what testing was performed and which tests were
added.>

Added unit tests. Providing manual testing steps as well:

### How to test this manually

1. Using the following config file:
```yaml
receivers:
  filelog:
    start_at: end
    include_file_name: false
    include_file_path: true
    include:
    - /var/log/pods/*/*/*.log
    operators:
      - id: container-parser
        type: container
        output: m1
      - type: move
        id: m1
        from: attributes.k8s.pod.name
        to: attributes.val
      - id: some
        type: add
        field: attributes.key2.key_in
        value: val2

exporters:
  debug:
    verbosity: detailed

service:
  pipelines:
    logs:
      receivers: [filelog]
      exporters: [debug]
      processors: []
```
2. Start the collector:
`./bin/otelcontribcol_linux_amd64 --config
~/otelcol/container_parser/config.yaml`
3. Use the following bash script to create some logs:
```bash
#! /bin/bash

echo '2024-04-13T07:59:37.505201169-05:00 stdout P This is a very very long crio line th' >> /var/log/pods/kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler43/1.log
echo '{"log":"INFO: log line here","stream":"stdout","time":"2029-03-30T08:31:20.545192187Z"}' >> /var/log/pods/kube-controller-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d6/kube-controller/1.log
echo '2024-04-13T07:59:37.505201169-05:00 stdout F at is awesome! crio is awesome!' >> /var/log/pods/kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler43/1.log
echo '2021-06-22T10:27:25.813799277Z stdout P some containerd log th' >> /var/log/pods/kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log
echo '{"log":"INFO: another log line here","stream":"stdout","time":"2029-03-30T08:31:20.545192187Z"}' >> /var/log/pods/kube-controller-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d6/kube-controller/1.log
echo '2021-06-22T10:27:25.813799277Z stdout F at is super awesome! Containerd is awesome' >> /var/log/pods/kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log



echo '2024-04-13T07:59:37.505201169-05:00 stdout F standalone crio line which is awesome!' >> /var/log/pods/kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler43/1.log
echo '2021-06-22T10:27:25.813799277Z stdout F standalone containerd line that is super awesome!' >> /var/log/pods/kube-scheduler-kind-control-plane_49cc7c1fd3702c40b2686ea7486091d3/kube-scheduler44/1.log
```
4. Run the above as a bash script to verify any parallel processing.
Verify that the output is correct.


### Test manually on k8s

1. `make docker-otelcontribcol && docker tag otelcontribcol
otelcontribcol-dev:0.0.1 && kind load docker-image
otelcontribcol-dev:0.0.1`
2. Install using the following helm values file:
```yaml
mode: daemonset
presets:
  logsCollection:
    enabled: true

image:
  repository: otelcontribcol-dev
  tag: "0.0.1"
  pullPolicy: IfNotPresent

command:
  name: otelcontribcol

config:
  exporters:
    debug:
      verbosity: detailed
  receivers:
    filelog:
      start_at: end
      include_file_name: false
      include_file_path: true
      exclude:
        - /var/log/pods/default_daemonset-opentelemetry-collector*_*/opentelemetry-collector/*.log
      include:
        - /var/log/pods/*/*/*.log
      operators:
        - id: container-parser
          type: container
          output: some
        - id: some
          type: add
          field: attributes.key2.key_in
          value: val2


  service:
    pipelines:
      logs:
        receivers: [filelog]
        processors: [batch]
        exporters: [debug]
```
3. Check collector's output to verify the logs are parsed properly:
```console
2024-05-10T07:52:02.307Z	info	LogsExporter	{"kind": "exporter", "data_type": "logs", "name": "debug", "resource logs": 1, "log records": 2}
2024-05-10T07:52:02.307Z	info	ResourceLog #0
Resource SchemaURL: 
ScopeLogs #0
ScopeLogs SchemaURL: 
InstrumentationScope  
LogRecord #0
ObservedTimestamp: 2024-05-10 07:52:02.046236071 +0000 UTC
Timestamp: 2024-05-10 07:52:01.92533954 +0000 UTC
SeverityText: 
SeverityNumber: Unspecified(0)
Body: Str(otel logs at 07:52:01)
Attributes:
     -> log: Map({"iostream":"stdout"})
     -> time: Str(2024-05-10T07:52:01.92533954Z)
     -> k8s: Map({"container":{"name":"busybox","restart_count":"0"},"namespace":{"name":"default"},"pod":{"name":"daemonset-logs-6f6mn","uid":"1069e46b-03b2-4532-a71f-aaec06c0197b"}})
     -> logtag: Str(F)
     -> key2: Map({"key_in":"val2"})
     -> log.file.path: Str(/var/log/pods/default_daemonset-logs-6f6mn_1069e46b-03b2-4532-a71f-aaec06c0197b/busybox/0.log)
Trace ID: 
Span ID: 
Flags: 0
LogRecord #1
ObservedTimestamp: 2024-05-10 07:52:02.046411602 +0000 UTC
Timestamp: 2024-05-10 07:52:02.027386192 +0000 UTC
SeverityText: 
SeverityNumber: Unspecified(0)
Body: Str(otel logs at 07:52:02)
Attributes:
     -> log.file.path: Str(/var/log/pods/default_daemonset-logs-6f6mn_1069e46b-03b2-4532-a71f-aaec06c0197b/busybox/0.log)
     -> time: Str(2024-05-10T07:52:02.027386192Z)
     -> log: Map({"iostream":"stdout"})
     -> logtag: Str(F)
     -> k8s: Map({"container":{"name":"busybox","restart_count":"0"},"namespace":{"name":"default"},"pod":{"name":"daemonset-logs-6f6mn","uid":"1069e46b-03b2-4532-a71f-aaec06c0197b"}})
     -> key2: Map({"key_in":"val2"})
Trace ID: 
Span ID: 
Flags: 0
...
```


**Documentation:** <Describe the documentation added.>  Added

Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
JaredTan95 pushed a commit that referenced this pull request Jun 5, 2024
…try#33225)

**Description:** <Describe what has changed.>
Using the DB span example below, X-Ray exporter failed to generate the
expected DB call subsegment names because it could not parse JDBC
connection strings that start with the `jdbc:` prefix.
```
Span #1
    Trace ID       : 663a0b68a5e3849c09c07f914b3df738
    Parent ID      : 1052e2a4a2516884
    ID             : 374de78b552e23c2
    Name           : orders@no-appsignals-mysql-1.cnkqok6c8mo1.eu-west-1.rds.amazonaws.com
    Kind           : Client
    Start time     : 2024-05-07 11:07:20.62 +0000 UTC
    End time       : 2024-05-07 11:07:20.624 +0000 UTC
    Status code    : Unset
    Status message :
Attributes:
     -> db.connection_string: Str(jdbc:mysql://no-appsignals-mysql-1.cnkqok6c8mo1.eu-west-1.rds.amazonaws.com:3306)
     -> db.name: Str(orders)
     -> db.system: Str(MySQL)
     -> db.user: Str(myuser@10.0.149.233)
```

**Link to tracking Issue:** <Issue number if applicable>

**Testing:** <Describe what testing was performed and which tests were
added.>
local tests
JaredTan95 pushed a commit that referenced this pull request Jun 5, 2024
…pen-telemetry#33353)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
Container parser should add k8s metadata as resource attributes and not
as log record attributes.

**Link to tracking Issue:** <Issue number if applicable> Fixes
open-telemetry#33341

**Testing:** <Describe what testing was performed and which tests were
added.>
Manual testing on local k8s cluster:

```console
2024-06-04T06:40:08.219Z	info	ResourceLog #0
Resource SchemaURL: 
Resource attributes:
     -> k8s.pod.uid: Str(d5ecc924-e255-4525-b5be-6437939b1e4d)
     -> k8s.container.name: Str(busybox)
     -> k8s.namespace.name: Str(default)
     -> k8s.pod.name: Str(daemonset-logs-dhzcq)
     -> k8s.container.restart_count: Str(0)
ScopeLogs #0
ScopeLogs SchemaURL: 
InstrumentationScope  
LogRecord #0
ObservedTimestamp: 2024-06-04 06:40:08.007370503 +0000 UTC
Timestamp: 2024-06-04 06:40:07.855932421 +0000 UTC
SeverityText: 
SeverityNumber: Unspecified(0)
Body: Str(otel logs at 06:40:07)
Attributes:
     -> logtag: Str(F)
     -> key2: Map({"key_in":"val2"})
     -> log.file.path: Str(/var/log/pods/default_daemonset-logs-dhzcq_d5ecc924-e255-4525-b5be-6437939b1e4d/busybox/0.log)
     -> time: Str(2024-06-04T06:40:07.855932421Z)
     -> log.iostream: Str(stdout)
Trace ID: 
Span ID: 
Flags: 0
LogRecord #1
ObservedTimestamp: 2024-06-04 06:40:08.007451031 +0000 UTC
Timestamp: 2024-06-04 06:40:07.957875321 +0000 UTC
SeverityText: 
SeverityNumber: Unspecified(0)
Body: Str(otel logs at 06:40:07)
Attributes:
     -> log.file.path: Str(/var/log/pods/default_daemonset-logs-dhzcq_d5ecc924-e255-4525-b5be-6437939b1e4d/busybox/0.log)
     -> log.iostream: Str(stdout)
     -> time: Str(2024-06-04T06:40:07.957875321Z)
     -> key2: Map({"key_in":"val2"})
     -> logtag: Str(F)
Trace ID: 
Span ID: 
Flags: 0
```

**Documentation:** <Describe the documentation added.> ~

---------

Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
JaredTan95 pushed a commit that referenced this pull request Jul 4, 2024
…try.log_response_body` config (open-telemetry#33854)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
- Add `telemetry.log_request_body` and `telemetry.log_response_body`
config for debugging. Debug log will contain field `request_body` and/or
`response_body` in the same log line instead of separate lines to avoid
interleaved log lines.
- Change "Request failed" log level to debug.

Output:
```
2024-07-02T14:09:24.983+0100	debug	elasticsearchexporter/elasticsearch_bulk.go:67	Request roundtrip completed.	{"kind": "exporter", "data_type": "logs", "name": "elasticsearch", "response_body": "{\"version\":{\"number\":\"1.2.3\"}}\n", "path": "/", "method": "GET", "duration": 0.000865486, "status": "200 OK"}
2024-07-02T14:09:24.984+0100	debug	elasticsearchexporter/elasticsearch_bulk.go:67	Request roundtrip completed.	{"kind": "exporter", "data_type": "logs", "name": "elasticsearch", "request_body": "{\"create\":{\"_index\":\"logs-test-idx\"}}\n{\"@timestamp\":\"2024-07-02T13:09:24.970187592Z\",\"Attributes\":{\"a\":\"test\",\"b\":5,\"batch_index\":\"batch_1\",\"c\":3,\"d\":true,\"item_index\":\"item_1\"},\"Body\":\"Load Generator Counter #0\",\"Scope\":{\"name\":\"\",\"version\":\"\"},\"SeverityNumber\":11,\"SeverityText\":\"INFO3\",\"TraceFlags\":1}\n{\"create\":{\"_index\":\"logs-test-idx\"}}\n{\"@timestamp\":\"2024-07-02T13:09:24.970187592Z\",\"Attributes\":{\"a\":\"test\",\"b\":5,\"batch_index\":\"batch_1\",\"c\":3,\"d\":true,\"item_index\":\"item_2\"},\"Body\":\"Load Generator Counter #1\",\"Scope\":{\"name\":\"\",\"version\":\"\"},\"SeverityNumber\":11,\"SeverityText\":\"INFO3\",\"TraceFlags\":1}\n", "response_body": "{\"took\":0,\"errors\":false,\"items\":[{\"create\":{\"_index\":\"logs-test-idx\",\"_id\":\"\",\"_version\":0,\"result\":\"\",\"status\":201,\"_seq_no\":0,\"_primary_term\":0,\"_shards\":{\"total\":0,\"successful\":0,\"failed\":0},\"error\":{\"type\":\"\",\"reason\":\"\",\"caused_by\":{\"type\":\"\",\"reason\":\"\"}}}},{\"create\":{\"_index\":\"logs-test-idx\",\"_id\":\"\",\"_version\":0,\"result\":\"\",\"status\":201,\"_seq_no\":0,\"_primary_term\":0,\"_shards\":{\"total\":0,\"successful\":0,\"failed\":0},\"error\":{\"type\":\"\",\"reason\":\"\",\"caused_by\":{\"type\":\"\",\"reason\":\"\"}}}}]}\n", "path": "/_bulk", "method": "POST", "duration": 0.000539979, "status": "200 OK"}
```

Required config to log
```
exporters:
  elasticsearch:
    telemetry:
      log_request_body: true
      log_response_body: true
    
service:
  telemetry:
    logs:
      level: debug
```

For easier analysis, limit the size of request body size. Use
`num_workers`=1 and lower `flush.bytes` and/or `flush.interval`.

**Link to tracking Issue:** <Issue number if applicable>

**Testing:** <Describe what testing was performed and which tests were
added.>

Manually verified with a modified integration test.

**Documentation:** <Describe the documentation added.>
JaredTan95 pushed a commit that referenced this pull request Oct 4, 2024
… Histo --> Histogram (open-telemetry#33824)

## Description

This PR adds a custom metric function to the transformprocessor to
convert exponential histograms to explicit histograms.

Link to tracking issue: Resolves open-telemetry#33827

**Function Name**
```
convert_exponential_histogram_to_explicit_histogram
```

**Arguments:**

- `distribution` (_upper, midpoint, uniform, random_)
- `ExplicitBoundaries: []float64`

**Usage example:**

```yaml
processors:
  transform:
    error_mode: propagate
    metric_statements:
    - context: metric
      statements:
        - convert_exponential_histogram_to_explicit_histogram("random", [10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0]) 
```

**Converts:**

```
Resource SchemaURL: 
ScopeMetrics #0
ScopeMetrics SchemaURL: 
InstrumentationScope  
Metric #0
Descriptor:
     -> Name: response_time
     -> Description: 
     -> Unit: 
     -> DataType: ExponentialHistogram
     -> AggregationTemporality: Delta
ExponentialHistogramDataPoints #0
Data point attributes:
     -> metric_type: Str(timing)
StartTimestamp: 1970-01-01 00:00:00 +0000 UTC
Timestamp: 2024-07-31 09:35:25.212037 +0000 UTC
Count: 44
Sum: 999.000000
Min: 40.000000
Max: 245.000000
Bucket (32.000000, 64.000000], Count: 10
Bucket (64.000000, 128.000000], Count: 22
Bucket (128.000000, 256.000000], Count: 12
        {"kind": "exporter", "data_type": "metrics", "name": "debug"}
```

**To:**

```
Resource SchemaURL: 
ScopeMetrics #0
ScopeMetrics SchemaURL: 
InstrumentationScope  
Metric #0
Descriptor:
     -> Name: response_time
     -> Description: 
     -> Unit: 
     -> DataType: Histogram
     -> AggregationTemporality: Delta
HistogramDataPoints #0
Data point attributes:
     -> metric_type: Str(timing)
StartTimestamp: 1970-01-01 00:00:00 +0000 UTC
Timestamp: 2024-07-30 21:37:07.830902 +0000 UTC
Count: 44
Sum: 999.000000
Min: 40.000000
Max: 245.000000
ExplicitBounds #0: 10.000000
ExplicitBounds #1: 20.000000
ExplicitBounds #2: 30.000000
ExplicitBounds #3: 40.000000
ExplicitBounds #4: 50.000000
ExplicitBounds #5: 60.000000
ExplicitBounds #6: 70.000000
ExplicitBounds #7: 80.000000
ExplicitBounds #8: 90.000000
ExplicitBounds #9: 100.000000
Buckets #0, Count: 0
Buckets #1, Count: 0
Buckets #2, Count: 0
Buckets #3, Count: 2
Buckets #4, Count: 5
Buckets #5, Count: 0
Buckets #6, Count: 3
Buckets #7, Count: 7
Buckets #8, Count: 2
Buckets #9, Count: 4
Buckets #10, Count: 21
        {"kind": "exporter", "data_type": "metrics", "name": "debug"}
```

### Testing

- Several unit tests have been created. We have also tested by ingesting
and converting exponential histograms from the `statsdreceiver` as well
as directly via the `otlpreceiver` over grpc over several hours with a
large amount of data.

- We have clients that have been running this solution in production for
a number of weeks.

### Readme description:

### convert_exponential_hist_to_explicit_hist

`convert_exponential_hist_to_explicit_hist([ExplicitBounds])`

the `convert_exponential_hist_to_explicit_hist` function converts an
ExponentialHistogram to an Explicit (_normal_) Histogram.

`ExplicitBounds` is represents the list of bucket boundaries for the new
histogram. This argument is __required__ and __cannot be empty__.

__WARNING:__

The process of converting an ExponentialHistogram to an Explicit
Histogram is not perfect and may result in a loss of precision. It is
important to define an appropriate set of bucket boundaries to minimize
this loss. For example, selecting Boundaries that are too high or too
low may result histogram buckets that are too wide or too narrow,
respectively.

---------

Co-authored-by: Kent Quirk <kentquirk@gmail.com>
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
JaredTan95 pushed a commit that referenced this pull request Oct 13, 2024
…etry#35544)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

As described at
open-telemetry#35491,
it is useful to provide the option to the users for defining
`receiver_creator`'s templates per container.

In this regard, the current PR introduces a new type of Endpoint called
`PodContainer` that matches the rule type `pod.container`. This Endpoint
is emitted for each container of the Pod similarly to how the `Port`
Endpoints are emitted per container that defines a port.

A complete example on how to use this feature to apply different parsing
on each of the Pod's container is provided in the `How to test this
manually` section.

**Link to tracking Issue:** <Issue number if applicable> Fixes
open-telemetry#35491

**Testing:** <Describe what testing was performed and which tests were
added.> TBA

**Documentation:** <Describe the documentation added.> TBA


### How to test this manually

1. Use the following values file to deploy the Collector's Helm chart
```yaml
mode: daemonset

image:
  repository: otelcontribcol-dev
  tag: "latest"
  pullPolicy: IfNotPresent

command:
  name: otelcontribcol

clusterRole:
  create: true
  rules:
   - apiGroups:
     - ''
     resources:
     - 'pods'
     - 'nodes'
     verbs:
     - 'get'
     - 'list'
     - 'watch'
   - apiGroups: [ "" ]
     resources: [ "nodes/proxy"]
     verbs: [ "get" ]
   - apiGroups:
       - ""
     resources:
       - nodes/stats
     verbs:
       - get
   - nonResourceURLs:
       - "/metrics"
     verbs:
       - get

extraVolumeMounts:
 - name: varlogpods
   mountPath: /var/log/pods
   readOnly: true

extraVolumes:
  - name: varlogpods
    hostPath:
      path: /var/log/pods

config:
  extensions:
    k8s_observer:
      auth_type: serviceAccount
      node: ${env:K8S_NODE_NAME}
      observe_nodes: true
  exporters:
    debug:
      verbosity: basic
  receivers:
    receiver_creator/logs:
      watch_observers: [ k8s_observer ]
      receivers:
        filelog/busybox:
          rule: type == "pod.container" && pod.labels["otel.logs"] == "true" && container_name == "busybox"
          config:
            include:
              - /var/log/pods/`pod.namespace`_`pod.name`_`pod.uid`/`container_name`/*.log
            include_file_name: false
            include_file_path: true
            operators:
              - id: container-parser
                type: container
              - type: add
                field: attributes.log.template
                value: busybox
        filelog/lazybox:
          rule: type == "pod.container" && pod.labels["otel.logs"] == "true" && container_name == "lazybox"
          config:
            include:
              - /var/log/pods/`pod.namespace`_`pod.name`_`pod.uid`/`container_name`/*.log
            include_file_name: false
            include_file_path: true
            operators:
              - id: container-parser
                type: container
              - type: add
                field: attributes.log.template
                value: lazybox
  service:
    extensions: [health_check, k8s_observer]
    pipelines:
      logs:
        receivers: [receiver_creator/logs]
        processors: [batch]
        exporters: [debug]
```
2. Follow the logs of the Collector's Pod i.e: `k logs -f
daemonset-opentelemetry-collector-agent-2hrg5`
3. Deploy a sample Pod which consists of 2 different containers:

```yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: daemonset-logs
  labels:
    app: daemonset-logs
spec:
  selector:
    matchLabels:
      app.kubernetes.io/component: migration-logger
      otel.logs: "true"
  template:
    metadata:
      labels:
        app.kubernetes.io/component: migration-logger
        otel.logs: "true"
    spec:
      tolerations:
        - key: node-role.kubernetes.io/master
          effect: NoSchedule
      containers:
        - name: lazybox
          image: busybox
          args:
            - /bin/sh
            - -c
            - while true; do echo "otel logs at $(date +%H:%M:%S)" && sleep 0.1s; done
        - name: busybox
          image: busybox
          args:
            - /bin/sh
            - -c
            - while true; do echo "otel logs at $(date +%H:%M:%S)" && sleep 0.1s; done
```

Verify in the logs that only 2 filelog receivers are started, one per
container:

```console
2024-10-02T12:05:17.506Z	info	receivercreator@v0.110.0/observerhandler.go:96	starting receiver	{"kind": "receiver", "name": "receiver_creator/logs", "data_type": "logs", "name": "filelog/lazybox", "endpoint": "10.244.0.13", "endpoint_id": "k8s_observer/01543800-cfea-4c10-8220-387e60f65151/lazybox"}
2024-10-02T12:05:17.508Z	info	adapter/receiver.go:47	Starting stanza receiver	{"kind": "receiver", "name": "receiver_creator/logs", "data_type": "logs", "name": "filelog/lazybox/receiver_creator/logs{endpoint=\"10.244.0.13\"}/k8s_observer/01543800-cfea-4c10-8220-387e60f65151/lazybox"}
2024-10-02T12:05:17.508Z	info	receivercreator@v0.110.0/observerhandler.go:96	starting receiver	{"kind": "receiver", "name": "receiver_creator/logs", "data_type": "logs", "name": "filelog/busybox", "endpoint": "10.244.0.13", "endpoint_id": "k8s_observer/01543800-cfea-4c10-8220-387e60f65151/busybox"}
2024-10-02T12:05:17.510Z	info	adapter/receiver.go:47	Starting stanza receiver	{"kind": "receiver", "name": "receiver_creator/logs", "data_type": "logs", "name": "filelog/busybox/receiver_creator/logs{endpoint=\"10.244.0.13\"}/k8s_observer/01543800-cfea-4c10-8220-387e60f65151/busybox"}
2024-10-02T12:05:17.709Z	info	fileconsumer/file.go:256	Started watching file	{"kind": "receiver", "name": "receiver_creator/logs", "data_type": "logs", "name": "filelog/lazybox/receiver_creator/logs{endpoint=\"10.244.0.13\"}/k8s_observer/01543800-cfea-4c10-8220-387e60f65151/lazybox", "component": "fileconsumer", "path": "/var/log/pods/default_daemonset-logs-sz4zk_01543800-cfea-4c10-8220-387e60f65151/lazybox/0.log"}
2024-10-02T12:05:17.712Z	info	fileconsumer/file.go:256	Started watching file	{"kind": "receiver", "name": "receiver_creator/logs", "data_type": "logs", "name": "filelog/busybox/receiver_creator/logs{endpoint=\"10.244.0.13\"}/k8s_observer/01543800-cfea-4c10-8220-387e60f65151/busybox", "component": "fileconsumer", "path": "/var/log/pods/default_daemonset-logs-sz4zk_01543800-cfea-4c10-8220-387e60f65151/busybox/0.log"}
```

In addition verify that the proper attributes are added per container
according to the 2 different filelog receiver definitions:


```console
2024-10-02T12:23:55.117Z	info	ResourceLog #0
Resource SchemaURL: 
Resource attributes:
     -> k8s.pod.name: Str(daemonset-logs-sz4zk)
     -> k8s.container.restart_count: Str(0)
     -> k8s.pod.uid: Str(01543800-cfea-4c10-8220-387e60f65151)
     -> k8s.container.name: Str(lazybox)
     -> k8s.namespace.name: Str(default)
     -> container.id: Str(63a8e69bdc6ee95ee7918baf913a548190f32838adeb0e6189a8210e05157b40)
     -> container.image.name: Str(busybox)
ScopeLogs #0
ScopeLogs SchemaURL: 
InstrumentationScope  
LogRecord #0
ObservedTimestamp: 2024-10-02 12:23:54.896772888 +0000 UTC
Timestamp: 2024-10-02 12:23:54.750904381 +0000 UTC
SeverityText: 
SeverityNumber: Unspecified(0)
Body: Str(otel logs at 12:23:54)
Attributes:
     -> log.iostream: Str(stdout)
     -> logtag: Str(F)
     -> log: Map({"template":"lazybox"})
     -> log.file.path: Str(/var/log/pods/default_daemonset-logs-sz4zk_01543800-cfea-4c10-8220-387e60f65151/lazybox/0.log)
Trace ID: 
Span ID: 
Flags: 0
ResourceLog #1
Resource SchemaURL: 
Resource attributes:
     -> k8s.container.restart_count: Str(0)
     -> k8s.pod.uid: Str(01543800-cfea-4c10-8220-387e60f65151)
     -> k8s.container.name: Str(busybox)
     -> k8s.namespace.name: Str(default)
     -> k8s.pod.name: Str(daemonset-logs-sz4zk)
     -> container.id: Str(47163758424f2bc5382b1e9702301be23cab368b590b5fbf0b30affa09b4a199)
     -> container.image.name: Str(busybox)
ScopeLogs #0
ScopeLogs SchemaURL: 
InstrumentationScope  
LogRecord #0
ObservedTimestamp: 2024-10-02 12:23:54.897788935 +0000 UTC
Timestamp: 2024-10-02 12:23:54.749885634 +0000 UTC
SeverityText: 
SeverityNumber: Unspecified(0)
Body: Str(otel logs at 12:23:54)
Attributes:
     -> log.file.path: Str(/var/log/pods/default_daemonset-logs-sz4zk_01543800-cfea-4c10-8220-387e60f65151/busybox/0.log)
     -> logtag: Str(F)
     -> log.iostream: Str(stdout)
     -> log: Map({"template":"busybox"})
Trace ID: 
Span ID: 
Flags: 0
```

Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
JaredTan95 pushed a commit that referenced this pull request Jan 22, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Generates simple histograms using telemetrygen
<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Test with a local otel collector with debug output

```
bin/telemetrygen metrics --metrics 5  --otlp-http --otlp-endpoint "localhost:4318"    --metric-type Histogram --otlp-insecure 
```
Output from debug Exporter: 
```
Resource SchemaURL: https://opentelemetry.io/schemas/1.13.0
ScopeMetrics #0
ScopeMetrics SchemaURL:
InstrumentationScope
Metric #0
Descriptor:
     -> Name: gen
     -> Description:
     -> Unit:
     -> DataType: Histogram
     -> AggregationTemporality: Cumulative
HistogramDataPoints #0
StartTimestamp: 2024-11-13 16:22:50.633365 +0000 UTC
Timestamp: 2024-11-13 16:22:51.633367 +0000 UTC
Count: 0
Sum: 0.000000
ExplicitBounds #0: 0.000000
ExplicitBounds #1: 1.000000
ExplicitBounds #2: 2.000000
ExplicitBounds #3: 3.000000
ExplicitBounds #4: 4.000000
Buckets #0, Count: 0
Buckets #1, Count: 0
Buckets #2, Count: 0
Buckets #3, Count: 0
Buckets #4, Count: 0
ResourceMetrics #1
Resource SchemaURL: https://opentelemetry.io/schemas/1.13.0
ScopeMetrics #0
ScopeMetrics SchemaURL:
InstrumentationScope
Metric #0
Descriptor:
     -> Name: gen
     -> Description:
     -> Unit:
     -> DataType: Histogram
     -> AggregationTemporality: Cumulative
HistogramDataPoints #0
StartTimestamp: 2024-11-13 16:22:50.639942 +0000 UTC
Timestamp: 2024-11-13 16:22:51.639942 +0000 UTC
Count: 1
Sum: 1.000000
ExplicitBounds #0: 0.000000
ExplicitBounds #1: 1.000000
ExplicitBounds #2: 2.000000
ExplicitBounds #3: 3.000000
ExplicitBounds #4: 4.000000
Buckets #0, Count: 0
Buckets #1, Count: 1
Buckets #2, Count: 0
Buckets #3, Count: 0
Buckets #4, Count: 0
ResourceMetrics #2
Resource SchemaURL: https://opentelemetry.io/schemas/1.13.0
ScopeMetrics #0
ScopeMetrics SchemaURL:
InstrumentationScope
Metric #0
Descriptor:
     -> Name: gen
     -> Description:
     -> Unit:
     -> DataType: Histogram
     -> AggregationTemporality: Cumulative
HistogramDataPoints #0
StartTimestamp: 2024-11-13 16:22:50.6404 +0000 UTC
Timestamp: 2024-11-13 16:22:51.640401 +0000 UTC
Count: 2
Sum: 4.000000
ExplicitBounds #0: 0.000000
ExplicitBounds #1: 1.000000
ExplicitBounds #2: 2.000000
ExplicitBounds #3: 3.000000
ExplicitBounds #4: 4.000000
Buckets #0, Count: 0
Buckets #1, Count: 1
Buckets #2, Count: 0
Buckets #3, Count: 1
Buckets #4, Count: 0
ResourceMetrics #3
Resource SchemaURL: https://opentelemetry.io/schemas/1.13.0
ScopeMetrics #0
ScopeMetrics SchemaURL:
InstrumentationScope
Metric #0
Descriptor:
     -> Name: gen
     -> Description:
     -> Unit:
     -> DataType: Histogram
     -> AggregationTemporality: Cumulative
HistogramDataPoints #0
StartTimestamp: 2024-11-13 16:22:50.640729 +0000 UTC
Timestamp: 2024-11-13 16:22:51.640729 +0000 UTC
Count: 3
Sum: 3.000000
ExplicitBounds #0: 0.000000
ExplicitBounds #1: 1.000000
ExplicitBounds #2: 2.000000
ExplicitBounds #3: 3.000000
ExplicitBounds #4: 4.000000
Buckets #0, Count: 1
Buckets #1, Count: 1
Buckets #2, Count: 1
Buckets #3, Count: 0
Buckets #4, Count: 0
ResourceMetrics #4
Resource SchemaURL: https://opentelemetry.io/schemas/1.13.0
ScopeMetrics #0
ScopeMetrics SchemaURL:
InstrumentationScope
Metric #0
Descriptor:
     -> Name: gen
     -> Description:
     -> Unit:
     -> DataType: Histogram
     -> AggregationTemporality: Cumulative
HistogramDataPoints #0
StartTimestamp: 2024-11-13 16:22:50.641073 +0000 UTC
Timestamp: 2024-11-13 16:22:51.641073 +0000 UTC
Count: 4
Sum: 12.000000
ExplicitBounds #0: 0.000000
ExplicitBounds #1: 1.000000
ExplicitBounds #2: 2.000000
ExplicitBounds #3: 3.000000
ExplicitBounds #4: 4.000000
Buckets #0, Count: 0
Buckets #1, Count: 0
Buckets #2, Count: 1
Buckets #3, Count: 2
Buckets #4, Count: 1
        {"kind": "exporter", "data_type": "metrics", "name": "debug"}
```
<!--Describe the documentation added.-->
#### Documentation

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
JaredTan95 pushed a commit that referenced this pull request Apr 11, 2025
#### Description

Vulnerability #1: GO-2025-3420
Sensitive headers incorrectly sent after cross-domain redirect in
net/http
  More info: https://pkg.go.dev/vuln/GO-2025-3420
  Standard library
    Found in: net/http@go1.22.8
    Fixed in: net/http@go1.22.11
    Example traces found:
Error: #1: codeowners.go:212:55:
githubgen.codeownersGenerator.getGithubMembers calls
github.OrganizationsService.ListMembers, which eventually calls
http.Client.Do

Vulnerability #2:
GO-[20](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/13003223509/job/36265594395?pr=37492#step:6:21)25-3373
Usage of IPv6 zone IDs can bypass URI name constraints in crypto/x509
  More info: https://pkg.go.dev/vuln/GO-2025-3373
  Standard library
Found in:
crypto/x509@go1.[22](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/13003223509/job/36265594395?pr=37492#step:6:23).8
    Fixed in: crypto/x509@go1.22.11
    Example traces found:

Related:
open-telemetry/opentelemetry-collector#12197
JaredTan95 pushed a commit that referenced this pull request Apr 11, 2025
…ry#38146)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This PR adds support for configuring metric temporality (delta or
cumulative) in the telemetrygen tool. This allows users to generate
metrics with different temporality types, which is particularly useful
for testing different metric collection scenarios.

##### Changes

- Added `temporalityType` flag for metrics pipeline that accepts values:
`delta` or `cumulative`


<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#38073 

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Testing was performed by setting up as simple collector with `otlp
`receiver and `debug` exporter

##### Sum Datapoint

```
Resource SchemaURL: https://opentelemetry.io/schemas/1.13.0
Resource attributes:
     -> service.name: Str(telemetrygen)
ScopeMetrics #0
ScopeMetrics SchemaURL: 
InstrumentationScope  
Metric #0
Descriptor:
     -> Name: gen
     -> Description: 
     -> Unit: 
     -> DataType: Histogram
     -> AggregationTemporality: Delta
```

##### Histogram Datapoint

```
Count: 0
Sum: 3940.000000
ExplicitBounds #0: 0.000000
ExplicitBounds #1: 5.000000
ExplicitBounds #2: 10.000000
ExplicitBounds #3: 25.000000
ExplicitBounds #4: 50.000000
ExplicitBounds #5: 75.000000
ExplicitBounds #6: 100.000000
ExplicitBounds #7: 250.000000
ExplicitBounds #8: 500.000000
ExplicitBounds #9: 750.000000
ExplicitBounds #10: 1000.000000
ExplicitBounds #11: 2500.000000
ExplicitBounds #12: 5000.000000
ExplicitBounds #13: 7500.000000
ExplicitBounds #14: 10000.000000
Buckets #0, Count: 0
Buckets #1, Count: 0
Buckets #2, Count: 1
Buckets #3, Count: 0
Buckets #4, Count: 0
Buckets #5, Count: 0
Buckets #6, Count: 3
Buckets #7, Count: 4
Buckets #8, Count: 1
Buckets #9, Count: 1
Buckets #10, Count: 0
Buckets #11, Count: 0
Buckets #12, Count: 0
Buckets #13, Count: 0
Buckets #14, Count: 0
```


- [x] Need to add tests for the config

---------

Signed-off-by: Nikos Angelopoulos <nikolaos.angelopoulos@grafana.com>
JaredTan95 pushed a commit that referenced this pull request Apr 11, 2025
…-telemetry#38500)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Breaking change.

Overhaul in document routing. New document routing logic:
```
Documents are statically or dynamically routed to the target index / data stream in the following order. The first routing mode that applies will be used.
1. "Static mode": Route to `logs_index` for log records, `metrics_index` for data points and `traces_index` for spans, if these configs are not empty respectively. [^3]
2. "Dynamic - Index attribute mode": Route to index name specified in `elasticsearch.index` attribute (precedence: log record / data point / span attribute > scope attribute > resource attribute) if the attribute exists. [^3]
3. "Dynamic - Data stream routing mode": Route to data stream constructed from `${data_stream.type}-${data_stream.dataset}-${data_stream.namespace}`,
where `data_stream.type` is `logs` for log records, `metrics` for data points, and `traces` for spans, and is static. [^3]
In a special case with `mapping::mode: bodymap`, `data_stream.type` field (valid values: `logs`, `metrics`) can be dynamically set from attributes.
The resulting documents will contain the corresponding `data_stream.*` fields, see restrictions applied to [Data Stream Fields](https://www.elastic.co/guide/en/ecs/current/ecs-data_stream.html).
   1. `data_stream.dataset` or `data_stream.namespace` in attributes (precedence: log record / data point / span attribute > scope attribute > resource attribute)
   2. Otherwise, if scope name matches regex `/receiver/(\w*receiver)`, `data_stream.dataset` will be capture group #1
   3. Otherwise, `data_stream.dataset` falls back to `generic` and `data_stream.namespace` falls back to `default`. 
```

```
In OTel mapping mode (`mapping::mode: otel`), there is special handling in addition to the above document routing rules in [Elasticsearch document routing](#elasticsearch-document-routing).
The order to determine the routing mode is the same as [Elasticsearch document routing](#elasticsearch-document-routing).

1. "Static mode": Span events are separate documents routed to `logs_index` if non-empty.
2. "Dynamic - Index attribute mode": Span events are separate documents routed using attribute `elasticsearch.index` (precedence: span event attribute > scope attribute > resource attribute) if the attribute exists.
3. "Dynamic - Data stream routing mode":
  - For all documents, `data_stream.dataset` will always be appended with `.otel`.
  - A special case to (3)(1) in [Elasticsearch document routing](#elasticsearch-document-routing), span events are separate documents that have `data_stream.type: logs` and are routed using data stream attributes (precedence: span event attribute > scope attribute > resource attribute)

```

Effective changes:
- Deprecate and make `{logs,metrics,traces}_dynamic_index` config no-op
- Config validation error on
`{logs,metrics,traces}_dynamic_index::enabled` and
`{logs,metrics,traces}_index` set at the same time, as users who rely on
dynamic index should not set `{logs,metrics,traces}_index`.
- Remove `elasticsearch.index.{prefix,suffix}` handling. Replace it with
`elasticsearch.index` handling that uses attribute value as index
directly. Users rely on the previously supported
`elasticsearch.index.prefix` and `elasticsearch.index.suffix` should
migrate to a transform processor that sets `elasticsearch.index`.
- Fix a bug where receiver-based routing overwrites data_stream.dataset.

Should be released together with
open-telemetry#38458

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#38361

<!--Describe what testing was performed and which tests were added.-->
#### Testing

<!--Describe the documentation added.-->
#### Documentation

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
Frapschen pushed a commit that referenced this pull request Jul 11, 2025
…elemetry#40559)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Prometheus remote write exporter add extra logs for the RW2 code path.

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes

Partially implements
open-telemetry#33661
(when merging PR please don't close the tracing issue)

<!--Describe what testing was performed and which tests were added.-->
#### Testing
* [x] e2e ran with prometheus locally


Sample of the logs running against both Prometheus `v3.4.1` and
`v2.53.1` (which doesn't support RW2).

![image](https://github.com/user-attachments/assets/ff27ed02-87fa-4e5e-b7cf-65dcaf3c1907)

```
2025-06-09T17:15:44.390+0200	info	grpc@v1.72.2/server.go:886	[core] [Server #1 ListenSocket #2]ListenSocket created	{"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "grpc_log": true}
2025-06-09T17:15:52.173+0200	warn	prometheusremotewriteexporter/exporter.go:420	X-Prometheus-Remote-Write-Samples-Written header is missing from the response, suggesting that the endpoint doesn't support RW2.	{"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "url": "http://localhost:9091/api/v1/write"}
2025-06-09T17:15:53.968+0200	warn	prometheusremotewriteexporter/exporter.go:420	X-Prometheus-Remote-Write-Samples-Written header is missing from the response, suggesting that the endpoint doesn't support RW2.	{"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "url": "http://localhost:9091/api/v1/write"}
2025-06-09T17:15:57.164+0200	warn	prometheusremotewriteexporter/exporter.go:420	X-Prometheus-Remote-Write-Samples-Written header is missing from the response, suggesting that the endpoint doesn't support RW2.	{"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "url": "http://localhost:9091/api/v1/write"}
2025-06-09T17:15:58.966+0200	warn	prometheusremotewriteexporter/exporter.go:420	X-Prometheus-Remote-Write-Samples-Written header is missing from the response, suggesting that the endpoint doesn't support RW2.	{"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "url": "http://localhost:9091/api/v1/write"}
2025-06-09T17:16:02.164+0200	debug	prometheusremotewriteexporter/exporter.go:425	X-Prometheus-Remote-Write-Samples-Written	{"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "samples_written": "22"}
2025-06-09T17:16:02.164+0200	debug	prometheusremotewriteexporter/exporter.go:428	X-Prometheus-Remote-Write-Histograms-Written	{"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "histograms_written": "0"}
2025-06-09T17:16:02.164+0200	debug	prometheusremotewriteexporter/exporter.go:431	X-Prometheus-Remote-Write-Exemplars-Written	{"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "exemplars_written": "0"}
2025-06-09T17:16:03.967+0200	debug	prometheusremotewriteexporter/exporter.go:425	X-Prometheus-Remote-Write-Samples-Written	{"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "samples_written": "290"}
2025-06-09T17:16:03.967+0200	debug	prometheusremotewriteexporter/exporter.go:428	X-Prometheus-Remote-Write-Histograms-Written	{"resource": {"service.instance.id": "383f7fdd-08e5-4e4c-85fe-c1fe3002d1ba", "service.name": "otelcontribcol", "service.version": "0.127.0-dev"}, "otelcol.component.id": "prometheusremotewrite/prometheus", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "histograms_written": "0"}
```

cc @krajorama @ywwg
JaredTan95 pushed a commit that referenced this pull request Oct 15, 2025
…b.uid (open-telemetry#42641)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This PR adds support to expose `k8s.cronjob.uid` as resource metadata
when a `Job` is owned by a `CronJob`.

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue

Fixes open-telemetry#42557

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Local tested with `telemetrygen` and is working as expected.

```
[pod/k8sevents-receiver-opentelemetry-collector-6fd9966559-brlb6/opentelemetry-collector] {"level":"debug","ts":"2025-09-11T16:29:11.588Z","caller":"k8sattributesprocessor@v0.135.0/processor.go:159","msg":"getting the pod","resource":{"service.instance.id":"9631e38b-aec3-439f-8178-d96fc8368e1e","service.name":"otelcontribcol","service.version":"0.135.0-dev"},"otelcol.component.id":"k8sattributes","otelcol.component.kind":"processor","otelcol.pipeline.id":"traces","otelcol.signal":"traces","pod":{"Name":"otel-log-cronjob-29293469-lw97x","Address":"10.244.0.70","PodUID":"7960681c-5a24-4287-8bea-e2cf506500ee","Attributes":{"k8s.cronjob.name":"otel-log-cronjob","k8s.cronjob.uid":"082b1c42-e393-46bc-9d51-b20a3700d1ab","k8s.job.name":"otel-log-cronjob-29293469","k8s.job.uid":"fbd853b8-7f63-44d8-ace1-8b48c89e3041"},"StartTime":"2025-09-11T16:29:00Z","Ignore":false,"Namespace":"default","NodeName":"","DeploymentUID":"","StatefulSetUID":"","DaemonSetUID":"","JobUID":"fbd853b8-7f63-44d8-ace1-8b48c89e3041","HostNetwork":false,"Containers":{"ByID":null,"ByName":null},"DeletedAt":"0001-01-01T00:00:00Z"}}
[pod/k8sevents-receiver-opentelemetry-collector-6fd9966559-brlb6/opentelemetry-collector] {"level":"info","ts":"2025-09-11T16:29:11.588Z","msg":"Traces","resource":{"service.instance.id":"9631e38b-aec3-439f-8178-d96fc8368e1e","service.name":"otelcontribcol","service.version":"0.135.0-dev"},"otelcol.component.id":"debug","otelcol.component.kind":"exporter","otelcol.signal":"traces","resource spans":1,"spans":2}
[pod/k8sevents-receiver-opentelemetry-collector-6fd9966559-brlb6/opentelemetry-collector] {"level":"info","ts":"2025-09-11T16:29:11.588Z","msg":"ResourceSpans #0\nResource SchemaURL: https://opentelemetry.io/schemas/1.4.0\nResource attributes:\n     -> k8s.container.name: Str(telemetrygen)\n     -> service.name: Str(telemetrygen)\n     -> k8s.pod.ip: Str(10.244.0.70)\n     -> k8s.cronjob.name: Str(otel-log-cronjob)\n     -> k8s.cronjob.uid: Str(082b1c42-e393-46bc-9d51-b20a3700d1ab)\n     -> k8s.job.uid: Str(fbd853b8-7f63-44d8-ace1-8b48c89e3041)\n     -> k8s.job.name: Str(otel-log-cronjob-29293469)\nScopeSpans #0\nScopeSpans SchemaURL: \nInstrumentationScope telemetrygen \nSpan #0\n    Trace ID       : 3c7381c14a37814676b00a7d961cb219\n    Parent ID      : 4f8780d5148a9c1c\n    ID             : 17e9da9533dc93ca\n    Name           : okey-dokey-0\n    Kind           : Server\n    Start time     : 2025-09-11 16:29:09.583785469 +0000 UTC\n    End time       : 2025-09-11 16:29:09.583908469 +0000 UTC\n    Status code    : Unset\n    Status message : \nAttributes:\n     -> net.peer.ip: Str(1.2.3.4)\n     -> peer.service: Str(telemetrygen-client)\nSpan #1\n    Trace ID       : 3c7381c14a37814676b00a7d961cb219\n    Parent ID      : \n    ID             : 4f8780d5148a9c1c\n    Name           : lets-go\n    Kind           : Client\n    Start time     : 2025-09-11 16:29:09.583785469 +0000 UTC\n    End time       : 2025-09-11 16:29:09.583908469 +0000 UTC\n    Status code    : Unset\n    Status message : \nAttributes:\n     -> net.peer.ip: Str(1.2.3.4)\n     -> peer.service: Str(telemetrygen-server)\n","resource":{"service.instance.id":"9631e38b-aec3-439f-8178-d96fc8368e1e","service.name":"otelcontribcol","service.version":"0.135.0-dev"},"otelcol.component.id":"debug","otelcol.component.kind":"exporter","otelcol.signal":"traces"}
```

Added also the tests to guarantee the proper functionality.

---------

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
JaredTan95 added a commit that referenced this pull request Oct 15, 2025
* Update module github.com/redis/go-redis/v9 to v9.14.0 (#42736)

Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs
from Renovate will soon appear from 'Mend'. Learn more
[here](https://github.com/renovatebot/renovate/discussions/37842).

This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[github.com/redis/go-redis/v9](https://github.com/redis/go-redis)
| `v9.12.1` -> `v9.14.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fredis%2fgo-redis%2fv9/v9.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fredis%2fgo-redis%2fv9/v9.12.1/v9.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>redis/go-redis (github.com/redis/go-redis/v9)</summary>

###
[`v9.14.0`](https://github.com/redis/go-redis/releases/tag/v9.14.0):
9.14.0

[Compare
Source](https://github.com/redis/go-redis/compare/v9.13.0...v9.14.0)

#### Highlights

- Added batch process method to the pipeline
([#&#8203;3510](https://github.com/redis/go-redis/pull/3510))

### Changes

#### 🚀 New Features

- Added batch process method to the pipeline
([#&#8203;3510](https://github.com/redis/go-redis/pull/3510))

#### 🐛 Bug Fixes

- fix: SetErr on Cmd if the command cannot be queued correctly in
multi/exec
([#&#8203;3509](https://github.com/redis/go-redis/pull/3509))

#### 🧰 Maintenance

- Updates release drafter config to exclude dependabot
([#&#8203;3511](https://github.com/redis/go-redis/pull/3511))
- chore(deps): bump actions/setup-go from 5 to 6
([#&#8203;3504](https://github.com/redis/go-redis/pull/3504))

#### Contributors

We'd like to thank all the contributors who worked on this release!

[@&#8203;elena-kolevska](https://github.com/elena-kolevksa),
[@&#8203;htemelski-redis](https://github.com/htemelski-redis)
and [@&#8203;ndyakov](https://github.com/ndyakov)

###
[`v9.13.0`](https://github.com/redis/go-redis/releases/tag/v9.13.0):
9.13.0

[Compare
Source](https://github.com/redis/go-redis/compare/v9.12.1...v9.13.0)

##### Highlights

- Pipeliner expose queued commands
([#&#8203;3496](https://github.com/redis/go-redis/pull/3496))
- Ensure that JSON.GET returns Nil response
([#&#8203;3470](https://github.com/redis/go-redis/pull/3470))
- Fixes on Read and Write buffer sizes and UniversalOptions

##### Changes

- Pipeliner expose queued commands
([#&#8203;3496](https://github.com/redis/go-redis/pull/3496))
- fix(test): fix a timing issue in pubsub test
([#&#8203;3498](https://github.com/redis/go-redis/pull/3498))
- Allow users to enable read-write splitting in failover mode.
([#&#8203;3482](https://github.com/redis/go-redis/pull/3482))
- Set the read/write buffer size of the sentinel client to 4KiB
([#&#8203;3476](https://github.com/redis/go-redis/pull/3476))

##### 🚀 New Features

- fix(otel): register wait metrics
([#&#8203;3499](https://github.com/redis/go-redis/pull/3499))
- Support subscriptions against cluster slave nodes
([#&#8203;3480](https://github.com/redis/go-redis/pull/3480))
- Add wait metrics to otel
([#&#8203;3493](https://github.com/redis/go-redis/pull/3493))
- Clean failing timeout implementation
([#&#8203;3472](https://github.com/redis/go-redis/pull/3472))

##### 🐛 Bug Fixes

- Do not assume that all non-IP hosts are loopbacks
([#&#8203;3085](https://github.com/redis/go-redis/pull/3085))
- Ensure that JSON.GET returns Nil response
([#&#8203;3470](https://github.com/redis/go-redis/pull/3470))

##### 🧰 Maintenance

- fix(otel): register wait metrics
([#&#8203;3499](https://github.com/redis/go-redis/pull/3499))
- fix(make test): Add default env in makefile
([#&#8203;3491](https://github.com/redis/go-redis/pull/3491))
- Update the introduction to running tests in README.md
([#&#8203;3495](https://github.com/redis/go-redis/pull/3495))
- test: Add comprehensive edge case tests for IncrByFloat command
([#&#8203;3477](https://github.com/redis/go-redis/pull/3477))
- Set the default read/write buffer size of Redis connection to 32KiB
([#&#8203;3483](https://github.com/redis/go-redis/pull/3483))
- Bumps test image to 8.2.1-pre
([#&#8203;3478](https://github.com/redis/go-redis/pull/3478))
- fix UniversalOptions miss ReadBufferSize and WriteBufferSize options
([#&#8203;3485](https://github.com/redis/go-redis/pull/3485))
- chore(deps): bump actions/checkout from 4 to 5
([#&#8203;3484](https://github.com/redis/go-redis/pull/3484))
- Removes dry run for stale issues policy
([#&#8203;3471](https://github.com/redis/go-redis/pull/3471))
- Update otel metrics URL
([#&#8203;3474](https://github.com/redis/go-redis/pull/3474))

##### Contributors

We'd like to thank all the contributors who worked on this release!

[@&#8203;LINKIWI](https://github.com/LINKIWI),
[@&#8203;cxljs](https://github.com/cxljs),
[@&#8203;cybersmeashish](https://github.com/cybersmeashish),
[@&#8203;elena-kolevska](https://github.com/elena-kolevska),
[@&#8203;htemelski-redis](https://github.com/htemelski-redis),
[@&#8203;mwhooker](https://github.com/mwhooker),
[@&#8203;ndyakov](https://github.com/ndyakov),
[@&#8203;ofekshenawa](https://github.com/ofekshenawa),
[@&#8203;suever](https://github.com/suever)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>

* [exporter/azureblob] Add template support for blob name formatting in Azure Blob exporter (#42674)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

When `template_enabled` is `true`, you can use Go templates in
`metrics_format`, `logs_format`, and `traces_format` to create dynamic
blob names based on telemetry data. The root object for the template is
the telemetry data itself (`pmetric.Metrics`, `plog.Logs`, or
`ptrace.Traces`).

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes #42643 

<!--Describe what testing was performed and which tests were added.-->
#### Testing

1. added test in `exporter_test.go`.
2. validated using real blob account.
```yaml
    blob_name_format:
      metrics_format: 2006/01/02/metrics_{{ (getResourceMetricAttr . 0 "service.name") }}_15_04.json
      logs_format: 2006/01/02/logs_{{ getScopeLogAttr . 0 0 "scope.name" }}_15_04.json
      traces_format: 2006/01/02/traces_{{ (getSpan . 0 0 0).Name }}_15_04.json
      template_enabled: true
```
<img width="632" height="365" alt="image"
src="https://github.com/user-attachments/assets/37f4fbcb-4b64-49c2-bff1-bcf6c0451578"
/>


<!--Describe the documentation added.-->
#### Documentation

Updated in `README.md`

<!--Please delete paragraphs that you did not use before submitting.-->

* Update module github.com/ClickHouse/clickhouse-go/v2 to v2.40.3 (#42708)

Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs
from Renovate will soon appear from 'Mend'. Learn more
[here](https://github.com/renovatebot/renovate/discussions/37842).

This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[github.com/ClickHouse/clickhouse-go/v2](https://github.com/ClickHouse/clickhouse-go)
| `v2.40.1` -> `v2.40.3` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fClickHouse%2fclickhouse-go%2fv2/v2.40.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fClickHouse%2fclickhouse-go%2fv2/v2.40.1/v2.40.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>ClickHouse/clickhouse-go
(github.com/ClickHouse/clickhouse-go/v2)</summary>

###
[`v2.40.3`](https://github.com/ClickHouse/clickhouse-go/blob/HEAD/CHANGELOG.md#v2403-2025-09-13----Release-notes-generated-using-configuration-in-githubreleaseyml-at-main---)

[Compare
Source](https://github.com/ClickHouse/clickhouse-go/compare/v2.40.2...v2.40.3)

#### What's Changed

##### Other Changes 🛠

- bug: deserializing into nullable field by
[@&#8203;rbroggi](https://github.com/rbroggi) in
[#&#8203;1649](https://github.com/ClickHouse/clickhouse-go/pull/1649)
- Fixes for
[#&#8203;1649](https://github.com/ClickHouse/clickhouse-go/issues/1649)
by [@&#8203;SpencerTorres](https://github.com/SpencerTorres) in
[#&#8203;1654](https://github.com/ClickHouse/clickhouse-go/pull/1654)

#### New Contributors

- [@&#8203;rbroggi](https://github.com/rbroggi) made their
first contribution in
[#&#8203;1649](https://github.com/ClickHouse/clickhouse-go/pull/1649)

**Full Changelog**:
<https://github.com/ClickHouse/clickhouse-go/compare/v2.40.2...v2.40.3>

###
[`v2.40.2`](https://github.com/ClickHouse/clickhouse-go/blob/HEAD/CHANGELOG.md#v2402-2025-09-13----Release-notes-generated-using-configuration-in-githubreleaseyml-at-main---)

[Compare
Source](https://github.com/ClickHouse/clickhouse-go/compare/v2.40.1...v2.40.2)

#### What's Changed

##### Other Changes 🛠

- Bump golang.org/x/net from 0.42.0 to 0.43.0 by
[@&#8203;dependabot](https://github.com/dependabot)\[bot] in
[#&#8203;1634](https://github.com/ClickHouse/clickhouse-go/pull/1634)
- Bump github.com/ClickHouse/ch-go from 0.67.0 to 0.68.0 by
[@&#8203;dependabot](https://github.com/dependabot)\[bot] in
[#&#8203;1639](https://github.com/ClickHouse/clickhouse-go/pull/1639)
- Bump github.com/stretchr/testify from 1.10.0 to 1.11.1 by
[@&#8203;dependabot](https://github.com/dependabot)\[bot] in
[#&#8203;1641](https://github.com/ClickHouse/clickhouse-go/pull/1641)
- Bump go.opentelemetry.io/otel/trace from 1.37.0 to 1.38.0 by
[@&#8203;dependabot](https://github.com/dependabot)\[bot] in
[#&#8203;1642](https://github.com/ClickHouse/clickhouse-go/pull/1642)
- Bump github.com/docker/docker from 28.3.3+incompatible to
28.4.0+incompatible by
[@&#8203;dependabot](https://github.com/dependabot)\[bot] in
[#&#8203;1646](https://github.com/ClickHouse/clickhouse-go/pull/1646)
- Bump golang.org/x/net from 0.43.0 to 0.44.0 by
[@&#8203;dependabot](https://github.com/dependabot)\[bot] in
[#&#8203;1647](https://github.com/ClickHouse/clickhouse-go/pull/1647)
- chore: migrate to maintained YAML library by
[@&#8203;joschi](https://github.com/joschi) in
[#&#8203;1651](https://github.com/ClickHouse/clickhouse-go/pull/1651)
- skip random tests on Go 1.25 by
[@&#8203;SpencerTorres](https://github.com/SpencerTorres) in
[#&#8203;1652](https://github.com/ClickHouse/clickhouse-go/pull/1652)
- bug: headers map can be nil by
[@&#8203;r0bobo](https://github.com/r0bobo) in
[#&#8203;1650](https://github.com/ClickHouse/clickhouse-go/pull/1650)

#### New Contributors

- [@&#8203;joschi](https://github.com/joschi) made their first
contribution in
[#&#8203;1651](https://github.com/ClickHouse/clickhouse-go/pull/1651)
- [@&#8203;r0bobo](https://github.com/r0bobo) made their first
contribution in
[#&#8203;1650](https://github.com/ClickHouse/clickhouse-go/pull/1650)

**Full Changelog**:
<https://github.com/ClickHouse/clickhouse-go/compare/v2.40.1...v2.40.2>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Yang Song <songy23@users.noreply.github.com>

* Update module github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common to v1.1.28 (#42743)

Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs
from Renovate will soon appear from 'Mend'. Learn more
[here](https://github.com/renovatebot/renovate/discussions/37842).

This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common](https://github.com/tencentcloud/tencentcloud-sdk-go)
| `v1.1.27` -> `v1.1.28` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2ftencentcloud%2ftencentcloud-sdk-go%2ftencentcloud%2fcommon/v1.1.28?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2ftencentcloud%2ftencentcloud-sdk-go%2ftencentcloud%2fcommon/v1.1.27/v1.1.28?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>tencentcloud/tencentcloud-sdk-go
(github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common)</summary>

###
[`v1.1.28`](https://github.com/tencentcloud/tencentcloud-sdk-go/compare/v1.1.27...v1.1.28)

[Compare
Source](https://github.com/tencentcloud/tencentcloud-sdk-go/compare/v1.1.27...v1.1.28)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>

* [processor/resourcedetection] Add support for Scaleway host image attributes (#42683)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Since the following
[PR](https://github.com/scaleway/scaleway-sdk-go/pull/2714) has been
merged and released, we can now expose host image metadata on the
Scaleway provider.

I kept both `host.image.id` and `host.image.name` as enabled by default
since the provider was not yet included in any release.

<!--Describe what testing was performed and which tests were added.-->
#### Testing

I tested directly in a VM, and also updated the tests to ensure these
values are exposed properly when enabled.

```sh
2025-09-15T13:33:27.366Z	info	service@v0.135.1-0.20250911155607-37a3ace6274c/service.go:205	Starting otelcontribcol...	{"resource": {"service.instance.id": "eb986521-bd97-4ab8-a739-b7a6ca95836f", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "Version": "0.135.0-dev", "NumCPU": 1}
2025-09-15T13:33:27.367Z	info	extensions/extensions.go:41	Starting extensions...	{"resource": {"service.instance.id": "eb986521-bd97-4ab8-a739-b7a6ca95836f", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}}
2025-09-15T13:33:27.368Z	info	internal/resourcedetection.go:137	began detecting resource information{"resource": {"service.instance.id": "eb986521-bd97-4ab8-a739-b7a6ca95836f", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "otelcol.component.id": "resourcedetection", "otelcol.component.kind": "processor", "otelcol.pipeline.id": "metrics", "otelcol.signal": "metrics"}
2025-09-15T13:33:27.512Z	info	internal/resourcedetection.go:188	detected resource information	{"resource": {"service.instance.id": "eb986521-bd97-4ab8-a739-b7a6ca95836f", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "otelcol.component.id": "resourcedetection", "otelcol.component.kind": "processor", "otelcol.pipeline.id": "metrics", "otelcol.signal": "metrics", "resource": {"cloud.account.id":"10542306-0c75-4265-9c2c-1fbfe4ea0bf0","cloud.availability_zone":"fr-par-1","cloud.platform":"scaleway_cloud_compute","cloud.provider":"scaleway_cloud","cloud.region":"fr-par","host.id":"132c8bcc-739d-4ed9-9b53-c5b27197a19b","host.image.id":"90e47fab-efa3-46d8-9607-f327a0ea65bb","host.image.name":"Ubuntu 24.04 Noble Numbat","host.name":"scw-goofy-borg","host.type":"STARDUST1-S"}}
2025-09-15T13:33:27.514Z	info	service@v0.135.1-0.20250911155607-37a3ace6274c/service.go:228	Everything is ready. Begin running and processing data.	{"resource": {"service.instance.id": "eb986521-bd97-4ab8-a739-b7a6ca95836f", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}}
2025-09-15T13:33:28.515Z	info	Metrics	{"resource": {"service.instance.id": "eb986521-bd97-4ab8-a739-b7a6ca95836f", "service.name": "otelcontribcol", "service.version": "0.135.0-dev"}, "otelcol.component.id": "debug", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics", "resource metrics": 3, "metrics": 5, "data points": 17}
2025-09-15T13:33:28.518Z	info	ResourceMetrics #0
Resource SchemaURL: https://opentelemetry.io/schemas/1.9.0
Resource attributes:
     -> cloud.account.id: Str(10542306-0c75-4265-9c2c-1fbfe4ea0bf0)
     -> cloud.availability_zone: Str(fr-par-1)
     -> cloud.provider: Str(scaleway_cloud)
     -> cloud.platform: Str(scaleway_cloud_compute)
     -> cloud.region: Str(fr-par)
     -> host.id: Str(132c8bcc-739d-4ed9-9b53-c5b27197a19b)
     -> host.image.id: Str(90e47fab-efa3-46d8-9607-f327a0ea65bb)
     -> host.image.name: Str(Ubuntu 24.04 Noble Numbat)
     -> host.name: Str(scw-goofy-borg)
     -> host.type: Str(STARDUST1-S)
```

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>

* docs: adjust netflow receiver block (#42717)

This pull request updates the example configuration in the
`receiver/netflowreceiver/README.md` file to fix the YAML formatting for
the NetFlow receiver. The change ensures that the configuration examples
use the correct structure for each receiver type.

Documentation and configuration improvements:

* Corrected the YAML structure by removing unnecessary list indicators
(`-`) before the `scheme` key for each receiver type in the example
configuration in `receiver/netflowreceiver/README.md`.

* [connector/spanmetrics] Support inserting collector.instance.id as an attribute to spanmetrics metrics (#41865)

#### Description

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes #40400

<!--Describe what testing was performed and which tests were added.-->
#### Testing

<!--Describe the documentation added.-->
#### Documentation

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Antoine Toulme <antoine@toulme.name>
Co-authored-by: Antoine Toulme <atoulme@splunk.com>

* [extension/storage/filestorage] Fix `recreate` from panic (#41802)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
* This enables recovery from a panic when the bbolt db is corrupted and
renames the file when a panic occurs.
* This changes the `recreate` behavior to not rename the file upon every
start of the collector.

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Resolves
https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/36840
Resolves
https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/35899

<!--Describe what testing was performed and which tests were added.-->
#### Testing
1. Start collector with file extension configured. This should create
the file with some content within it.
2. Stop the collector.
3. Manually edit or "break" the bbolt db file by adding characters in
random places, forcefully causing a panic
4. Start the collector
5. See logs:
```json
{"level":"info","ts":"2025-07-31T23:26:34.218-0400","msg":"Setting up own telemetry...","resource":{"service.instance.id":"d830aeff-7993-49f7-9817-a0c96af3498d","service.name":"otelcontribcol","service.version":"0.131.0-dev"}}
{"level":"info","ts":"2025-07-31T23:26:34.242-0400","msg":"Starting otelcontribcol...","resource":{"service.instance.id":"d830aeff-7993-49f7-9817-a0c96af3498d","service.name":"otelcontribcol","service.version":"0.131.0-dev"},"Version":"0.131.0-dev","NumCPU":6}
{"level":"info","ts":"2025-07-31T23:26:34.242-0400","msg":"Starting extensions...","resource":{"service.instance.id":"d830aeff-7993-49f7-9817-a0c96af3498d","service.name":"otelcontribcol","service.version":"0.131.0-dev"}}
{"level":"info","ts":"2025-07-31T23:26:34.242-0400","msg":"Extension is starting...","resource":{"service.instance.id":"d830aeff-7993-49f7-9817-a0c96af3498d","service.name":"otelcontribcol","service.version":"0.131.0-dev"},"otelcol.component.id":"file_storage/persistent_queue_storage","otelcol.component.kind":"extension"}
{"level":"info","ts":"2025-07-31T23:26:34.242-0400","msg":"Extension started.","resource":{"service.instance.id":"d830aeff-7993-49f7-9817-a0c96af3498d","service.name":"otelcontribcol","service.version":"0.131.0-dev"},"otelcol.component.id":"file_storage/persistent_queue_storage","otelcol.component.kind":"extension"}
#### This line ####
{"level":"warn","ts":"2025-07-31T23:26:34.242-0400","msg":"Database corruption detected, recreating database file","resource":{"service.instance.id":"d830aeff-7993-49f7-9817-a0c96af3498d","service.name":"otelcontribcol","service.version":"0.131.0-dev"},"otelcol.component.id":"file_storage/persistent_queue_storage","otelcol.component.kind":"extension","file":"/data/otelcol/persistent_queue_storage/exporter_otlphttp_general_logs","panic":"assertion failed: Page expected to be: 96, but self identifies as 4909050520039286100"}
{"level":"info","ts":"2025-07-31T23:26:34.243-0400","msg":"Corrupted database file renamed","resource":{"service.instance.id":"d830aeff-7993-49f7-9817-a0c96af3498d","service.name":"otelcontribcol","service.version":"0.131.0-dev"},"otelcol.component.id":"file_storage/persistent_queue_storage","otelcol.component.kind":"extension","original":"/data/otelcol/persistent_queue_storage/exporter_otlphttp_general_logs","backup":"/data/otelcol/persistent_queue_storage/exporter_otlphttp_general_logs.2025-08-27T13:26:07.479.backup"}
#### through this line ####
{"level":"info","ts":"2025-07-31T23:26:34.244-0400","msg":"New queue metadata key not found, attempting to load legacy format.","resource":{"service.instance.id":"d830aeff-7993-49f7-9817-a0c96af3498d","service.name":"otelcontribcol","service.version":"0.131.0-dev"},"otelcol.component.id":"otlphttp/general","otelcol.component.kind":"exporter","otelcol.signal":"logs"}
{"level":"info","ts":"2025-07-31T23:26:34.244-0400","msg":"Initializing new persistent queue","resource":{"service.instance.id":"d830aeff-7993-49f7-9817-a0c96af3498d","service.name":"otelcontribcol","service.version":"0.131.0-dev"},"otelcol.component.id":"otlphttp/general","otelcol.component.kind":"exporter","otelcol.signal":"logs"}
{"level":"info","ts":"2025-07-31T23:26:34.244-0400","msg":"Successfully migrated to consolidated metadata format","resource":{"service.instance.id":"d830aeff-7993-49f7-9817-a0c96af3498d","service.name":"otelcontribcol","service.version":"0.131.0-dev"},"otelcol.component.id":"otlphttp/general","otelcol.component.kind":"exporter","otelcol.signal":"logs"}
{"level":"info","ts":"2025-07-31T23:26:34.255-0400","msg":"Everything is ready. Begin running and processing data.","resource":{"service.instance.id":"d830aeff-7993-49f7-9817-a0c96af3498d","service.name":"otelcontribcol","service.version":"0.131.0-dev"}}
```

<!--Describe the documentation added.-->
#### Documentation
Updated the existing documentation with behavioral changes for
`recreate` option.

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Antoine Toulme <atoulme@splunk.com>

* [chore][receiver/journald]: improve README.md examples (#42692)

#### Description
Add the following examples to the documentation:
 - Minimal configuration
 - Cursor tracking
 - Reading from the beginning

<!--Describe the documentation added.-->
#### Documentation
This PR improves the documented examples

---------

Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>

* [chore] document metrics for allocatable_types_to_report setting (#42539)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Document the metrics produced by the `allocatable_types_to_report`
setting in the k8scluster receiver.

- Add an explicit table mapping allocatable types to metric names in
README.
- Clarify that `storage` is not part of Kubernetes Node Allocatable and
remove it from the listed types.
-
https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable
- Add a reference to Kubernetes Node Allocatable docs for clarity.

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes #42311 

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Deployed `opentelemetry-collector-contrib` v0.133.0 via the official
Helm chart(`mode=deployment`, `presets.clusterMetrics=true`) and enabled
allocatable metrics in the `k8s_cluster` receiver as follows:

```yaml
config:
  receivers:
    k8s_cluster:
      auth_type: serviceAccount
      collection_interval: 30s
      allocatable_types_to_report:
        - cpu
        - memory
        - ephemeral-storage
        - storage
        - pods
        
  exporters:
    prometheus:
      endpoint: "0.0.0.0:8889"
```

With this configuration, the following metrics were observed on
/metrics:
 
```
# HELP k8s_node_allocatable_cpu Amount of cpu allocatable on the node
# TYPE k8s_node_allocatable_cpu gauge
k8s_node_allocatable_cpu{otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver",otel_scope_schema_url="",otel_scope_version="0.133.0"} 1.93
# HELP k8s_node_allocatable_ephemeral_storage_bytes Amount of ephemeral-storage allocatable on the node
# TYPE k8s_node_allocatable_ephemeral_storage_bytes gauge
k8s_node_allocatable_ephemeral_storage_bytes{otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver",otel_scope_schema_url="",otel_scope_version="0.133.0"} 7.6224326324e+10
# HELP k8s_node_allocatable_memory_bytes Amount of memory allocatable on the node
# TYPE k8s_node_allocatable_memory_bytes gauge
k8s_node_allocatable_memory_bytes{otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver",otel_scope_schema_url="",otel_scope_version="0.133.0"} 5.54446848e+08
# HELP k8s_node_allocatable_pods Amount of pods allocatable on the node
# TYPE k8s_node_allocatable_pods gauge
k8s_node_allocatable_pods{otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver",otel_scope_schema_url="",otel_scope_version="0.133.0"} 4
```

<!--Describe the documentation added.-->
#### Documentation

<!--Please delete paragraphs that you did not use before submitting.-->

Signed-off-by: jaehanbyun <awbrg789@naver.com>
Co-authored-by: Christos Markou <chrismarkou92@gmail.com>

* Update module github.com/relvacode/iso8601 to v1.7.0 (#42737)

Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs
from Renovate will soon appear from 'Mend'. Learn more
[here](https://github.com/renovatebot/renovate/discussions/37842).

This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[github.com/relvacode/iso8601](https://github.com/relvacode/iso8601)
| `v1.6.0` -> `v1.7.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2frelvacode%2fiso8601/v1.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2frelvacode%2fiso8601/v1.6.0/v1.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>relvacode/iso8601 (github.com/relvacode/iso8601)</summary>

###
[`v1.7.0`](https://github.com/relvacode/iso8601/releases/tag/v1.7.0)

[Compare
Source](https://github.com/relvacode/iso8601/compare/v1.6.0...v1.7.0)

##### What's Changed

- Support whitespace between date and time component by
[@&#8203;relvacode](https://github.com/relvacode) in
[#&#8203;29](https://github.com/relvacode/iso8601/pull/29)
- Check for remaining data with Zulu zone by
[@&#8203;relvacode](https://github.com/relvacode) in
[#&#8203;31](https://github.com/relvacode/iso8601/pull/31)

**Full Changelog**:
<https://github.com/relvacode/iso8601/compare/v1.6.0...v1.7.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>

* [exporter/clickhouse] TLS config / Certificate based Authentication (#42581)

#### Description

Enables usage of OpenTelemetry's TLS configuration structure for
clickhouse-go driver.

Example:
```yaml
exporters:
  clickhouse:
    endpoint: tcp://127.0.0.1:9000
    tls:
      insecure: false
      insecure_skip_verify: false
      ca_file: CAroot.crt
      cert_file: client.crt
      key_file: client.key
```

#### Link to tracking issue
Fixes #22805, #41116

#### Testing

Added integration test that uses locally generated test certificates to
test certificate authentication with ClickHouse.

Certificates can be regenerated with `./testdata/certs/gen-certs.sh`.

Also updated ClickHouse image versions to latest stable/LTS.

#### Documentation

Updated README with `tls` config description and example.

* [receiver/splunkenterprise] fix typo search artifact size metrics (#42616)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
This PR fixes a typo in the search artifact size metrics, which is part
of the existing search dispatch collection. This typo has been causing
errors with parsing empty string values.

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue

https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/42615

* [internal/otelarrow] Remove manual time.Sleep call (#42548)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes
https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/42514

<!--Describe what testing was performed and which tests were added.-->
#### Testing

<!--Describe the documentation added.-->
#### Documentation

<!--Please delete paragraphs that you did not use before submitting.-->

Signed-off-by: Jared Tan <jian.tan@daocloud.io>
Co-authored-by: Antoine Toulme <atoulme@splunk.com>
Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>

* [chore]: add workflow for surveys of non-members (#42503)

The Contributor Experience group created a survey to help understand
challenges and feedback from new contributors. We have this survey
running for a few months on opentelemetry.io and the JS repo, with
helpful feedback, so now adding to more repos.

Example of message:
https://github.com/open-telemetry/opentelemetry-js/pull/5884#issuecomment-3237568813

---------

Co-authored-by: Antoine Toulme <antoine@toulme.name>

* [exporter/awss3exporter] add s3_base_prefix parameter (#42660)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Adds a new optional parameter `s3_base_prefix` to the `awss3exporter`
which is used as the root path for all files uploaded.

This new parameter is helpful when using the
`resource_attrs_to_s3/s3_prefix` override ability but you still want a
root path to be used for all file uploads.

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes #42661

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added unit tests and ran the otel collector locally using a config file
that specifies an `awss3` exporter with the new `s3_base_prefix`
parameter

<!--Describe the documentation added.-->
#### Documentation
Updated the readme and added new configuration examples

<!--Please delete paragraphs that you did not use before submitting.-->

* updated countconnector timestamps (#42006)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Updates the countconnector metric timestamps to use earliest timestamp
from batch as start timestamp and latest as timestamp, instead of using
timestamp from metric creation time


<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes #40573 

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Updates TracesToMetric tests to include checks for timestamp values

* [kubeletstats] Cleanup deprecated *.cpu.utilization metrics and respective feature gate (#42727)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
After the merge of
https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/41042
we need to completely remove the
`receiver.kubeletstats.enableCPUUsageMetrics` feature gate and cleanup
the component accordingly.

The feature gate has been [in place until
v0.131.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/41042/files#diff-3d568b694da81fd8cca718ee598c1fa14d20176a73af0f8d009388f5a6c2e11dR33)
hence now it can be removed entirely.

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes
https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/41178

Supersedes
https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/41880.

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Updated

<!--Describe the documentation added.-->
#### Documentation
Updated

<!--Please delete paragraphs that you did not use before submitting.-->

Co-authored-by: mugund10 <bjmugundhan@gmail.com>

Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Co-authored-by: mugund10 <bjmugundhan@gmail.com>

* [chore] Replace asciicheck dep since repo is no longer available (#42753)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Seems like github.com/tdakkota/asciicheck is no longer available, but
still imported
[(golangci/golangci-lint)](https://github.com/golangci/golangci-lint/blob/v2.4.0/go.mod#L115)
in the latest release. This is temporary until a new golangci-lint
release will use the updated asciicheck repo.
Some more context
[here](https://github.com/golangci/golangci-lint/pull/6018).

* [chore] Fix codeowners workflow (#42771)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

#### Description

Two codeowners in the allowlist have recently become OpenTelemetry
community members and no longer need to be in the allowlist.

* [chore][receiver/journald] Update stanza documentation (#42774)

#### Description
This commit updates configuration and filtering options in the stanza
documentation of the journald input to match the journald receiver
documentation.

* [chore][receiver/prometheus] Update kong integration test (#42776)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
[As
requested](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/42741#issuecomment-3307594964),
the Kong test for Prometheus should use a past scrape of kong data as
the input, rather than spinning up a kong docker container and
connecting to it.

* [receiver/kafkametrics] Implement client reset for recoverable errors in Sarama calls (#41363)

…

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
This change implements client reset functionality to address recoverable
errors in Sarama calls, such as connection resets and EOF errors. When a
recoverable error is encountered, the client is reset, enabling the
scraper to reconnect and resume metric collection seamlessly.
<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
none
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Existing tests were modified accordingly.
<!--Describe the documentation added.-->
#### Documentation
none
<!--Please delete paragraphs that you did not use before submitting.-->

* [cmd/telemetrygen] Add allow failed exports flag (#42136)

#### Description
Add --allow-export-failures flag to telemetrygen to continue running
when export operations fail (instead of terminating)

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes #42135

* [chore][testbed] Use os.MkdirTemp on Windows (#42770)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Same as #42635 in different tests.

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Updates #42639

---------

Co-authored-by: Yang Song <songy23@users.noreply.github.com>

* [chore] Update core dependencies (#42782)

This PR updates the opentelemetry-collector modules to
open-telemetry/opentelemetry-collector@ba0b327d5fe91b230f97e48f56f3c191bd89df2d

---------

Signed-off-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>

* [chore] Do not remove config file on testbed shutdown (#42789)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->

Hotfix to make sure contributors can merge PRs :)

#### Link to tracking issue

Updates #42639

* [chore][scoped-tests] Run twice instead of thrice (#42790)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->

Scoped tests are too slow for certain components (e.g. Prometheus
components) after #42498.

I still think running the tests more than once is a good idea to prevent
flakes, but maybe twice is a better balance between catching flakes and
not taking ages to merge each PR.

#### Link to tracking issue

Follows #42498

* [processor/k8sattributesprocessor] Add support for missing k8s.cronjob.uid (#42641)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This PR adds support to expose `k8s.cronjob.uid` as resource metadata
when a `Job` is owned by a `CronJob`.

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue

Fixes #42557

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Local tested with `telemetrygen` and is working as expected.

```
[pod/k8sevents-receiver-opentelemetry-collector-6fd9966559-brlb6/opentelemetry-collector] {"level":"debug","ts":"2025-09-11T16:29:11.588Z","caller":"k8sattributesprocessor@v0.135.0/processor.go:159","msg":"getting the pod","resource":{"service.instance.id":"9631e38b-aec3-439f-8178-d96fc8368e1e","service.name":"otelcontribcol","service.version":"0.135.0-dev"},"otelcol.component.id":"k8sattributes","otelcol.component.kind":"processor","otelcol.pipeline.id":"traces","otelcol.signal":"traces","pod":{"Name":"otel-log-cronjob-29293469-lw97x","Address":"10.244.0.70","PodUID":"7960681c-5a24-4287-8bea-e2cf506500ee","Attributes":{"k8s.cronjob.name":"otel-log-cronjob","k8s.cronjob.uid":"082b1c42-e393-46bc-9d51-b20a3700d1ab","k8s.job.name":"otel-log-cronjob-29293469","k8s.job.uid":"fbd853b8-7f63-44d8-ace1-8b48c89e3041"},"StartTime":"2025-09-11T16:29:00Z","Ignore":false,"Namespace":"default","NodeName":"","DeploymentUID":"","StatefulSetUID":"","DaemonSetUID":"","JobUID":"fbd853b8-7f63-44d8-ace1-8b48c89e3041","HostNetwork":false,"Containers":{"ByID":null,"ByName":null},"DeletedAt":"0001-01-01T00:00:00Z"}}
[pod/k8sevents-receiver-opentelemetry-collector-6fd9966559-brlb6/opentelemetry-collector] {"level":"info","ts":"2025-09-11T16:29:11.588Z","msg":"Traces","resource":{"service.instance.id":"9631e38b-aec3-439f-8178-d96fc8368e1e","service.name":"otelcontribcol","service.version":"0.135.0-dev"},"otelcol.component.id":"debug","otelcol.component.kind":"exporter","otelcol.signal":"traces","resource spans":1,"spans":2}
[pod/k8sevents-receiver-opentelemetry-collector-6fd9966559-brlb6/opentelemetry-collector] {"level":"info","ts":"2025-09-11T16:29:11.588Z","msg":"ResourceSpans #0\nResource SchemaURL: https://opentelemetry.io/schemas/1.4.0\nResource attributes:\n     -> k8s.container.name: Str(telemetrygen)\n     -> service.name: Str(telemetrygen)\n     -> k8s.pod.ip: Str(10.244.0.70)\n     -> k8s.cronjob.name: Str(otel-log-cronjob)\n     -> k8s.cronjob.uid: Str(082b1c42-e393-46bc-9d51-b20a3700d1ab)\n     -> k8s.job.uid: Str(fbd853b8-7f63-44d8-ace1-8b48c89e3041)\n     -> k8s.job.name: Str(otel-log-cronjob-29293469)\nScopeSpans #0\nScopeSpans SchemaURL: \nInstrumentationScope telemetrygen \nSpan #0\n    Trace ID       : 3c7381c14a37814676b00a7d961cb219\n    Parent ID      : 4f8780d5148a9c1c\n    ID             : 17e9da9533dc93ca\n    Name           : okey-dokey-0\n    Kind           : Server\n    Start time     : 2025-09-11 16:29:09.583785469 +0000 UTC\n    End time       : 2025-09-11 16:29:09.583908469 +0000 UTC\n    Status code    : Unset\n    Status message : \nAttributes:\n     -> net.peer.ip: Str(1.2.3.4)\n     -> peer.service: Str(telemetrygen-client)\nSpan #1\n    Trace ID       : 3c7381c14a37814676b00a7d961cb219\n    Parent ID      : \n    ID             : 4f8780d5148a9c1c\n    Name           : lets-go\n    Kind           : Client\n    Start time     : 2025-09-11 16:29:09.583785469 +0000 UTC\n    End time       : 2025-09-11 16:29:09.583908469 +0000 UTC\n    Status code    : Unset\n    Status message : \nAttributes:\n     -> net.peer.ip: Str(1.2.3.4)\n     -> peer.service: Str(telemetrygen-server)\n","resource":{"service.instance.id":"9631e38b-aec3-439f-8178-d96fc8368e1e","service.name":"otelcontribcol","service.version":"0.135.0-dev"},"otelcol.component.id":"debug","otelcol.component.kind":"exporter","otelcol.signal":"traces"}
```

Added also the tests to guarantee the proper functionality.

---------

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>

* Changelog fetch (#42340)

This is a redo of
https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/41849
with a fix, use quotes around the value '0' so it is not assimilated to
false.

---------

Co-authored-by: Paulo Janotti <pjanotti@splunk.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* [internal/kafka] disable client metrics (#42807)

#### Description

Disable franz-go's Kafka client metrics support. We did not
intentionally add these, we may consider reintroducing them in the
future with configuration.

Labeling this as a breaking change, though it's dubious: this isn't
documented, and came as part of the switch to franz-go which is still
under a feature gate.

#### Link to tracking issue

Fixes #42662

#### Testing

None

#### Documentation

None

* Bump prometheus/prometheus, prometheus/otlptranslator and opentelemetry-go's prometheus exporter (#42493)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Bumps prometheus/prometheus, prometheus/otlptranslator and
opentelemetry-go's Prometheus exporter to their latest versions.

They are being upgraded together because a backwards-incompatible change
to the Go API of otlptranslator between v0.0.1 and v0.0.2 occurred, and
Prometheus and OTel-go were using different versions until now. If we
upgrade one library at a time, the code doesn't compile.

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes

<!--Describe what testing was performed and which tests were added.-->
#### Testing

<!--Describe the documentation added.-->
#### Documentation

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* [chore]: enable rangeValCopy rule from go-critic (#42007)

#### Description

Enable and fixes
[rangeValCopy](https://go-critic.com/overview.html#rangevalcopy) rule
from go-critic

---------

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-authored-by: Antoine Toulme <atoulme@splunk.com>

* Better errors for attr procs: include the key. (#42280)

#### Description

Augmenting errors:

```diff
Aug 26 19:35:27 871b7f17-d975-4a84-ada7-237d998c19b5 titus-otelcol[8520]: 2025/08/26 19:35:27 collector 
server run finished with error: failed to build pipelines: failed to create "attributes/netflix" processor, in pipeline "traces":
- error creating AttrProc. Either field "value", "from_attribute" or "from_context" setting must be specified for 13-th action
+ error with key "nf.cluster" (13th-action): error creating AttrProc. Either field "value", "from_attribute" or  "from_context" setting must be specified
```

Note the key is specifically called out. That really makes it far easier
to debug errors than having to count, especially when I have 100s of
config options. (I actually only have 15, but you get the idea)

* [exporter/kafka] Fix franz-go ignores deprecated TLS config syntax (#42755)

#### Description
The syntax:

    auth:
      tls:
        ...

Was deprecated in v0.124.0, in favor of:

    tls:
      ...

The Sarama Kafka client accepts both syntaxes, but the franz-go client
ignores the deprecated syntax and silently falls back to a non-TLS
connection.

This fix adds support for the deprecated syntax until such time that it
actually gets removed.

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes #42754 

#### Testing
All existing tests pass. Verified deprecated syntax works against a real
TLS-enabled cluster, and fails without the fix.

#### Documentation
None.

* hostmetricsreceiver: add example metrics configuration to readme (#42759)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Just to be explicit for dummies like me, I think it would be better to
note where to place the "metrics" configurations. They are mentioned in
each scraper, but not explicitly in context. I had to try both the root
(outside of scrapers) and then within each scraper to get it to work.

Probably not a big issue to most, but I hope this will avoid at least
some confusion.

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
N/A

<!--Describe what testing was performed and which tests were added.-->
#### Testing
N/A

<!--Describe the documentation added.-->
#### Documentation
As above.

<!--Please delete paragraphs that you did not use before submitting.-->

* [chore] kafkaexporter: fix flaky test (#42806)

#### Description

Remove the artificial fetch timeout, and just use the test's context to
cancel the fetch if needed. All uses of the function expect a fetch to
complete quickly, there's no need for another timeout.

This is for #42777. I was not able to reproduce the issue locally, but I
can imagine on a _very_ slow machine that a fetch may not complete
within 500ms.

#### Link to tracking issue

Fixes #42777

#### Testing

Ran the tests in a loop. I couldn't get it to fail locally.

#### Documentation

N/A

* [telemetrygen] Add ExponentialHistogram as metric type (#42757)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

As @jmichalek132 suggested in #42322 this PR also adds
ExponentialHistogram and the option to send mixed metric types.
As stated
[here](https://opentelemetry.io/docs/specs/otel/metrics/data-model/?utm_source=chatgpt.com#summary-legacy)
Summary is not really supported so I left it out of this (even though it
is part of the metricdata SDK and it can be done), so with this PR
telemetrygen should be ready to support all otel supported metric data
point types.

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Part of #42322 but does not close it.

* Revert "[internal/otelarrow] Remove manual time.Sleep call" (#42812)

Reverts open-telemetry/opentelemetry-collector-contrib#42548

It looks like the test started failing again around the time this PR was
merged so I am proposing we revert this

cc @JaredTan95 

Reopens #42514
Fixes #42758

* [chore] Update core dependencies (#42815)

This PR updates the opentelemetry-collector modules to
open-telemetry/opentelemetry-collector@1f869ed2d7a2485ff5ce8e9666852415a9f2ce45

---------

Signed-off-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>

* feat: Add format identification in awslogsencodingextension (#42788)

### Description
This PR adds format identification to `awslogsencodingextension`
component.

### What was added

- **Scope attribute**: All logs now include an `awslogs_encoding.format`
attribute at the scope level
- **Format values**: Each AWS log type gets a specific format
identifier:
  - VPC Flow Logs: `vpc_flow_log`
  - ELB Access Logs: `elb_access_log` 
  - S3 Access Logs: `s3_access_log`
  - CloudTrail Logs: `cloudtrail_log`
  - WAF Logs: `waf_log`
- CloudWatch Logs via Subscription Filter:
`cloudwatch_logs_subscription_filter`

### Why was added

- Provides clear identification of log source format
- Supports downstream processing decisions based on log type, e.g.
routing or filtering

---------

Co-authored-by: Vignesh Shanmugam <vignesh.shanmugam22@gmail.com>

* [chore][exporter/elasticsearch,exporter/kafka] Switch to using experimental versions of symbols (#42817)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->

Uses the `xexporterhelper` version of these symbols since we are
removing the `exporterhelper` version.

#### Link to tracking issue

Unblocks open-telemetry/opentelemetry-collector/pull/13872

* [chore] [telemetrygen] Remove scale assertion from TestExponentialHistogramMetricGeneration (#42822)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Removes wrong assertion that causes a flaky test. The go-expohisto
library allows that field to be negative to the assertion is wrong.

Fixes
https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/42818
Fixes
https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/42819

* [chore] Add bogdan-st to telemetrygen codeowners (#42814)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Following a discussion and invitation from @mx-psi this PR adds myself
as a codeowner for telemetrygen.

* [chore] Bump go-build-tools to v0.28.0 (#42821)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Bumps Go build tools to v0.28.0. Notably adds some goodies for
issuegenerator

I left the checkapi one out since it's a lot of work and we can do it
independently

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue

Updates #36761
Updates #42518

* [chore][exporter/clickhouse] Remove an unused function (#42811)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Removed the function `newPlaceholder` in the internal package as it
seems no longer used.

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Unit & Integration tests

* [chore] Prepare release 0.136.0 (#42828)

The following commands were run to prepare this release:
- make chlog-update VERSION=v0.136.0
- sed -i.bak s/0[.]135[.]0/0.136.0/g versions.yaml
- make multimod-prerelease
- make multimod-sync

---------

Signed-off-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>

* kafka: fix support for protocol_version in franz-go client (#42833)

#### Description

The franz-go client was ignoring `protocol_version`. We now set both
MinVersions and MaxVersions options based on the specified version, so
the client assumes that exact version.

#### Link to tracking issue

Relates to #42795

#### Testing

Tested with kafkaexporter against Azure Event Hubs, which currently only
works on Windows if you specify a version < 4 due to
https://github.com/twmb/franz-go/issues/1102

#### Documentation

None

* fix(deps): update module github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common to v1.1.31 (#42837)

Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs
from Renovate will soon appear from 'Mend'. Learn more
[here](https://github.com/renovatebot/renovate/discussions/37842).

This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common](https://github.com/tencentcloud/tencentcloud-sdk-go)
| `v1.1.28` -> `v1.1.31` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2ftencentcloud%2ftencentcloud-sdk-go%2ftencentcloud%2fcommon/v1.1.31?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2ftencentcloud%2ftencentcloud-sdk-go%2ftencentcloud%2fcommon/v1.1.28/v1.1.31?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>tencentcloud/tencentcloud-sdk-go
(github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common)</summary>

###
[`v1.1.31`](https://github.com/tencentcloud/tencentcloud-sdk-go/compare/v1.1.30...v1.1.31)

[Compare
Source](https://github.com/tencentcloud/tencentcloud-sdk-go/compare/v1.1.30...v1.1.31)

###
[`v1.1.30`](https://github.com/tencentcloud/tencentcloud-sdk-go/compare/v1.1.29...v1.1.30)

[Compare
Source](https://github.com/tencentcloud/tencentcloud-sdk-go/compare/v1.1.29...v1.1.30)

###
[`v1.1.29`](https://github.com/tencentcloud/tencentcloud-sdk-go/compare/v1.1.28...v1.1.29)

[Compare
Source](https://github.com/tencentcloud/tencentcloud-sdk-go/compare/v1.1.28...v1.1.29)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>

* [telemtrygen] Add load size to metrics and logs (#42756)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Adds configurable load size to metrics and logs in telemetrygen.

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Part of #42322 but does not close it.

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Unit tests for feature and config validation.

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>

* fix(deps): update module github.com/hetznercloud/hcloud-go/v2 to v2.24.0 (#42841)

Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs
from Renovate will soon appear from 'Mend'. Learn more
[here](https://github.com/renovatebot/renovate/discussions/37842).

This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[github.com/hetznercloud/hcloud-go/v2](https://github.com/hetznercloud/hcloud-go)
| `v2.23.0` -> `v2.24.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fhetznercloud%2fhcloud-go%2fv2/v2.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fhetznercloud%2fhcloud-go%2fv2/v2.23.0/v2.24.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>hetznercloud/hcloud-go
(github.com/hetznercloud/hcloud-go/v2)</summary>

###
[`v2.24.0`](https://github.com/hetznercloud/hcloud-go/blob/HEAD/CHANGELOG.md#v2240)

[Compare
Source](https://github.com/hetznercloud/hcloud-go/compare/v2.23.0...v2.24.0)

##### Features

- add new ip\_range param to ServerAttachToNetwork
([#&#8203;723](https://github.com/hetznercloud/hcloud-go/issues/723))
- add new ip\_range param to LoadBalancerAttachToNetwork
([#&#8203;724](https://github.com/hetznercloud/hcloud-go/issues/724))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>

* [chore][telemetrygen] Fix traces count in traces integration test (#42850)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Seems like we can't control how the BatchSpanProcessor batches traces
for export. Sometimes it s 3 traces in 3 exports but sometimes there are
4 exports. Changed the logic to count the actual trace ids instead of
the number of exports.

Also made the name of the binary unique to avoid conflicts and increased
the duration a bit, that was also failing locally sometimes.

* [chore][exporter/datadog] Fix pseudoversion (#42845)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

When DataDog/datadog-agent@c0e8c8158aa2 was committed,
https://github.com/DataDog/datadog-agent/releases/tag/comp/otelcol/otlp/testutil/v0.72.0-devel
did not exist, so on #42553 we based the pseudoversion on the preceding
tag,
https://github.com/DataDog/datadog-agent/releases/tag/comp/otelcol/otlp/testutil/v0.71.0-devel.

This made Renovate confused over at #42832 so I am bumping the base
version of the pseudoversion here so that Renovate works correctly
(right now Renovate tries to _downgrade_ to v0.72.0-devel but this
commit comes after v0.72.0-devl)

* chore(deps): update prom/prometheus docker tag to v3.6.0 (#42840)

Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs
from Renovate will soon appear …
JaredTan95 pushed a commit that referenced this pull request Dec 29, 2025
…-telemetry#43882)

#### Description

Currently `{TraceID,SpanID,ProfileID}` only support byte IDs, however in
open-telemetry#43429
it was brought up that it is difficult to take a string representation
of an ID and directly use that to set a trace ID. This would be for a
hexadecimal string representation comprising 32 bytes. This change
allows the `{TraceID,SpanID,ProfileID}` functions to also work on string
inputs.

In short, the following now works:

```yaml
statements:
  - set(span.trace_id, TraceID("a389023abaa839283293ed323892389d"))
```

#### Link to tracking issue
Fixes
open-telemetry#43429

#### Testing

In addition to the included go tests the following config 


[test-str-trace.yml](https://github.com/user-attachments/files/23217501/test-str-trace.yml)

was used to manually test by invoking `make otelcontribcol &&
./bin/otelcontribcol_darwin_arm64 --config test-str-trace.yml` in one
window and `telemetrygen traces --otlp-insecure --traces 1` in another.
The output is as shown:
<details>
<summary>CLI Output</summary>

```
Span #0
    Trace ID       : a389023abaa839283293ed323892389d
    Parent ID      : e5c516b0c8942eab
    ID             : 1914136d5f9ca838
    Name           : okey-dokey-0
    Kind           : Server
    Start time     : 2025-10-29 18:59:03.312829 +0000 UTC
    End time       : 2025-10-29 18:59:03.312952 +0000 UTC
    Status code    : Unset
    Status message :
Attributes:
     -> network.peer.address: Str(1.2.3.4)
     -> peer.service: Str(telemetrygen-client)
Span #1
    Trace ID       : a389023abaa839283293ed323892389d
    Parent ID      :
    ID             : e5c516b0c8942eab
    Name           : lets-go
    Kind           : Client
    Start time     : 2025-10-29 18:59:03.312829 +0000 UTC
    End time       : 2025-10-29 18:59:03.312952 +0000 UTC
    Status code    : Unset
    Status message :
Attributes:
     -> network.peer.address: Str(1.2.3.4)
     -> peer.service: Str(telemetrygen-server)
```

</details>

#### Documentation

I don't currently see documentation for these functions, but I'm new
here, maybe I'm missing something? Glad to update it

---------

Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>
Frapschen pushed a commit that referenced this pull request Feb 25, 2026
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Add `Base64Encode` OTTL converter function to encode strings into base64
format with support for multiple variants (`base64`, `base64-raw`,
`base64-url`, `base64-raw-url`). This function addresses the need to
handle characters not allowed by certain exporters like NATS Core.
<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#46071

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Tested manually and added unit and e2e tests.
Test config:
```yaml
processors:
  transform:
    log_statements:
      - context: log
        statements:
          - set(attributes["encoded_default"], Base64Encode(attributes["plain_text"]))
          
          - set(attributes["encoded_base64_raw"], Base64Encode(attributes["plain_text"], "base64-raw"))
          
          - set(attributes["encoded_base64_url"], Base64Encode(attributes["plain_text"], "base64-url"))
          
          - set(attributes["encoded_base64_raw_url"], Base64Encode(attributes["plain_text"], "base64-raw-url"))
```
Test input:
```json
{"plain_text": "test string"}
{"plain_text": "hello world"}
{"plain_text": "special chars: @#$%"}
{"plain_text": "URL encoding test: https://example.com?param=value&other=123"}
```
Test result:
```
LogRecord #0
Body: Str({"plain_text": "test string"})
Attributes:
     -> log.file.name: Str(test_data.log)
     -> plain_text: Str(test string)
     -> encoded_default: Str(dGVzdCBzdHJpbmc=)
     -> encoded_base64_raw: Str(dGVzdCBzdHJpbmc)
     -> encoded_base64_url: Str(dGVzdCBzdHJpbmc=)
     -> encoded_base64_raw_url: Str(dGVzdCBzdHJpbmc)
LogRecord #1
Body: Str({"plain_text": "hello world"})
Attributes:
     -> log.file.name: Str(test_data.log)
     -> plain_text: Str(hello world)
     -> encoded_default: Str(aGVsbG8gd29ybGQ=)
     -> encoded_base64_raw: Str(aGVsbG8gd29ybGQ)
     -> encoded_base64_url: Str(aGVsbG8gd29ybGQ=)
     -> encoded_base64_raw_url: Str(aGVsbG8gd29ybGQ)
LogRecord #2
Body: Str({"plain_text": "special chars: @#$%"})
Attributes:
     -> log.file.name: Str(test_data.log)
     -> plain_text: Str(special chars: @#$%)
     -> encoded_default: Str(c3BlY2lhbCBjaGFyczogQCMkJQ==)
     -> encoded_base64_raw: Str(c3BlY2lhbCBjaGFyczogQCMkJQ)
     -> encoded_base64_url: Str(c3BlY2lhbCBjaGFyczogQCMkJQ==)
     -> encoded_base64_raw_url: Str(c3BlY2lhbCBjaGFyczogQCMkJQ)
LogRecord #3
Body: Str({"plain_text": "URL encoding test: https://example.com?param=value&other=123"})
Attributes:
     -> log.file.name: Str(test_data.log)
     -> plain_text: Str(URL encoding test: https://example.com?param=value&other=123)
     -> encoded_default: Str(VVJMIGVuY29kaW5nIHRlc3Q6IGh0dHBzOi8vZXhhbXBsZS5jb20/cGFyYW09dmFsdWUmb3RoZXI9MTIz)
     -> encoded_base64_raw: Str(VVJMIGVuY29kaW5nIHRlc3Q6IGh0dHBzOi8vZXhhbXBsZS5jb20/cGFyYW09dmFsdWUmb3RoZXI9MTIz)
     -> encoded_base64_url: Str(VVJMIGVuY29kaW5nIHRlc3Q6IGh0dHBzOi8vZXhhbXBsZS5jb20_cGFyYW09dmFsdWUmb3RoZXI9MTIz)
     -> encoded_base64_raw_url: Str(VVJMIGVuY29kaW5nIHRlc3Q6IGh0dHBzOi8vZXhhbXBsZS5jb20_cGFyYW09dmFsdWUmb3RoZXI9MTIz)
```
<!--Describe the documentation added.-->
#### Documentation
Updated `README.md` with function documentation, usage examples, and
supported variants.

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants