Skip to content

STEF exporter incorrectly double-compresses output #38088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tigrannajaryan opened this issue Feb 20, 2025 · 0 comments · Fixed by #38089
Closed

STEF exporter incorrectly double-compresses output #38088

tigrannajaryan opened this issue Feb 20, 2025 · 0 comments · Fixed by #38089
Assignees
Labels
bug Something isn't working needs triage New item requiring triage

Comments

@tigrannajaryan
Copy link
Member

Component(s)

exporter/stef

What happened?

Description

The zstd compression option is incorrectly set both for STEF Writer and gRPC Client. This is unnecessary and also does not work if the destination gRPC receiver does not enable zstd compressor.

Steps to Reproduce

Use "compression: zstd" option with stef exporter and mock server that does not support zstd gRPC compression.

Expected Result

It should work.

Actual Result

gRPC connection fails.

Collector version

408f780

Environment information

No response

OpenTelemetry Collector configuration

receivers:
  hostmetrics:
    collection_interval: 1s
    scrapers:
      load:
      filesystem:
      memory:
      network:
      paging:
      processes:

exporters:
  debug:
    #loglevel: info
    #verbosity: Detailed

  stef:
    endpoint: localhost:4320
    compression: zstd
    tls:
      insecure: true

processors:

service:
  pipelines:
    metrics:
      receivers: [hostmetrics]
      processors: []
      exporters: [debug,stef]

  telemetry:
    resource:
      service.name: io.opentelemetry.collector

    logs:
      level: debug

Log output

2025-02-20T11:36:02.314-0500    error   internal/queue_sender.go:128    Exporting failed. Dropping data.        {"otelcol.component.id": "stef", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "
error": "interrupted due to shutdown: failed to connect to destination: failed to receive from server: rpc error: code = Unimplemented desc = grpc: Decompressor is not installed for grpc-encoding \"zstd\"", "dropp
ed_items": 291}

Additional context

No response

@tigrannajaryan tigrannajaryan added bug Something isn't working needs triage New item requiring triage labels Feb 20, 2025
@tigrannajaryan tigrannajaryan self-assigned this Feb 20, 2025
tigrannajaryan added a commit to tigrannajaryan/opentelemetry-collector-contrib that referenced this issue Feb 20, 2025
### Description

Resolves open-telemetry#38088

Previously the compression option was incorrectly set both
for STEF Writer and gRPC Client. This was unnecessary and
also did not work if the destination gRPC receiver did not
enable zstd compressor.

This change correctly removes the zstd compression option
from gRPC client and only sets it as a STEF Writer option.

### Testing Done

Added zstd compression option to TestExport unit test.

Tested manually with STEF Server here https://github.com/splunk/stef/tree/main/otelcol/cmd/stefmockserver

Built Collector contrib via `make otelcontribcol`. Used the following config for testing:

```yaml
receivers:
  hostmetrics:
    collection_interval: 1s
    scrapers:
      load:
      filesystem:
      memory:
      network:
      paging:
      processes:

exporters:
  debug:
  stef:
    endpoint: localhost:4320
    compressions: zstd
    tls:
      insecure: true

processors:

service:
  pipelines:
    metrics:
      receivers: [hostmetrics]
      processors: []
      exporters: [debug,stef]
```

Interestingly, with zstd enabled we get less than 1 byte per
metric data point with STEF!

```
$ ./stefmockserver_darwin_arm64
2025/02/20 11:28:48.335835 Listening for STEF/gRPC on port 4320
2025/02/20 11:49:55.002889 Incoming STEF/gRPC connection.
Records: 1285639, Messages: 4420, Bytes: 1139887, Bytes/point: 0.89, Acks: 4424, Last ACKID: 1285639
```
tigrannajaryan added a commit to tigrannajaryan/opentelemetry-collector-contrib that referenced this issue Feb 20, 2025
### Description

Resolves open-telemetry#38088

Previously the compression option was incorrectly set both
for STEF Writer and gRPC Client. This was unnecessary and
also did not work if the destination gRPC receiver did not
enable zstd compressor.

This change correctly removes the zstd compression option
from gRPC client and only sets it as a STEF Writer option.

### Testing Done

Added zstd compression option to TestExport unit test.

Tested manually with STEF Server here https://github.com/splunk/stef/tree/main/otelcol/cmd/stefmockserver

Built Collector contrib via `make otelcontribcol`. Used the following config for testing:

```yaml
receivers:
  hostmetrics:
    collection_interval: 1s
    scrapers:
      load:
      filesystem:
      memory:
      network:
      paging:
      processes:

exporters:
  debug:
  stef:
    endpoint: localhost:4320
    compressions: zstd
    tls:
      insecure: true

processors:

service:
  pipelines:
    metrics:
      receivers: [hostmetrics]
      processors: []
      exporters: [debug,stef]
```

Interestingly, with zstd enabled we get less than 1 byte per
metric data point with STEF!

```
$ ./stefmockserver_darwin_arm64
2025/02/20 11:28:48.335835 Listening for STEF/gRPC on port 4320
2025/02/20 11:49:55.002889 Incoming STEF/gRPC connection.
Records: 1285639, Messages: 4420, Bytes: 1139887, Bytes/point: 0.89, Acks: 4424, Last ACKID: 1285639
```
tigrannajaryan added a commit to tigrannajaryan/opentelemetry-collector-contrib that referenced this issue Feb 20, 2025
### Description

Resolves open-telemetry#38088

Previously the compression option was incorrectly set both
for STEF Writer and gRPC Client. This was unnecessary and
also did not work if the destination gRPC receiver did not
enable zstd compressor.

This change correctly removes the zstd compression option
from gRPC client and only sets it as a STEF Writer option.

### Testing Done

Added zstd compression option to TestExport unit test.

Tested manually with STEF Server here https://github.com/splunk/stef/tree/main/otelcol/cmd/stefmockserver

Built Collector contrib via `make otelcontribcol`. Used the following config for testing:

```yaml
receivers:
  hostmetrics:
    collection_interval: 1s
    scrapers:
      load:
      filesystem:
      memory:
      network:
      paging:
      processes:

exporters:
  debug:
  stef:
    endpoint: localhost:4320
    compressions: zstd
    tls:
      insecure: true

processors:

service:
  pipelines:
    metrics:
      receivers: [hostmetrics]
      processors: []
      exporters: [debug,stef]
```

Interestingly, with zstd enabled we get less than 1 byte per
metric data point with STEF!

```
$ ./stefmockserver_darwin_arm64
2025/02/20 11:28:48.335835 Listening for STEF/gRPC on port 4320
2025/02/20 11:49:55.002889 Incoming STEF/gRPC connection.
Records: 1285639, Messages: 4420, Bytes: 1139887, Bytes/point: 0.89, Acks: 4424, Last ACKID: 1285639
```
tigrannajaryan added a commit to tigrannajaryan/opentelemetry-collector-contrib that referenced this issue Feb 20, 2025
### Description

Resolves open-telemetry#38088

Previously the compression option was incorrectly set both
for STEF Writer and gRPC Client. This was unnecessary and
also did not work if the destination gRPC receiver did not
enable zstd compressor.

This change correctly removes the zstd compression option
from gRPC client and only sets it as a STEF Writer option.

### Testing Done

Added zstd compression option to TestExport unit test.

Tested manually with STEF Server here https://github.com/splunk/stef/tree/main/otelcol/cmd/stefmockserver

Built Collector contrib via `make otelcontribcol`. Used the following config for testing:

```yaml
receivers:
  hostmetrics:
    collection_interval: 1s
    scrapers:
      load:
      filesystem:
      memory:
      network:
      paging:
      processes:

exporters:
  debug:
  stef:
    endpoint: localhost:4320
    compressions: zstd
    tls:
      insecure: true

processors:

service:
  pipelines:
    metrics:
      receivers: [hostmetrics]
      processors: []
      exporters: [debug,stef]
```

Interestingly, with zstd enabled we get less than 1 byte per
metric data point with STEF!

```
$ ./stefmockserver_darwin_arm64
2025/02/20 11:28:48.335835 Listening for STEF/gRPC on port 4320
2025/02/20 11:49:55.002889 Incoming STEF/gRPC connection.
Records: 1285639, Messages: 4420, Bytes: 1139887, Bytes/point: 0.89, Acks: 4424, Last ACKID: 1285639
```
tigrannajaryan added a commit to tigrannajaryan/opentelemetry-collector-contrib that referenced this issue Feb 20, 2025
### Description

Resolves open-telemetry#38088

Previously the compression option was incorrectly set both
for STEF Writer and gRPC Client. This was unnecessary and
also did not work if the destination gRPC receiver did not
enable zstd compressor.

This change correctly removes the zstd compression option
from gRPC client and only sets it as a STEF Writer option.

### Testing Done

Added zstd compression option to TestExport unit test.

Tested manually with STEF Server here https://github.com/splunk/stef/tree/main/otelcol/cmd/stefmockserver

Built Collector contrib via `make otelcontribcol`. Used the following config for testing:

```yaml
receivers:
  hostmetrics:
    collection_interval: 1s
    scrapers:
      load:
      filesystem:
      memory:
      network:
      paging:
      processes:

exporters:
  debug:
  stef:
    endpoint: localhost:4320
    compressions: zstd
    tls:
      insecure: true

processors:

service:
  pipelines:
    metrics:
      receivers: [hostmetrics]
      processors: []
      exporters: [debug,stef]
```

Interestingly, with zstd enabled we get less than 1 byte per
metric data point with STEF!

```
$ ./stefmockserver_darwin_arm64
2025/02/20 11:28:48.335835 Listening for STEF/gRPC on port 4320
2025/02/20 11:49:55.002889 Incoming STEF/gRPC connection.
Records: 1285639, Messages: 4420, Bytes: 1139887, Bytes/point: 0.89, Acks: 4424, Last ACKID: 1285639
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New item requiring triage
Projects
None yet
1 participant