Skip to content
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

Double encoding of JSON responses #27604

Closed
atoulme opened this issue Oct 10, 2023 · 1 comment · Fixed by #27606
Closed

Double encoding of JSON responses #27604

atoulme opened this issue Oct 10, 2023 · 1 comment · Fixed by #27606
Labels
bug Something isn't working receiver/splunkhec

Comments

@atoulme
Copy link
Contributor

atoulme commented Oct 10, 2023

Component(s)

receiver/splunkhec

What happened?

Description

Steps to Reproduce

  • Run the collector with splunkhecreceiver
  • Send malformed data

Expected Result

The result should be a JSON object that exposes the error message related to the handling of the data.

Actual Result

The result is a JSON string representation of the JSON object.

Collector version

0.87.0

Environment information

No response

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@atoulme atoulme added bug Something isn't working needs triage New item requiring triage and removed needs triage New item requiring triage labels Oct 10, 2023
@github-actions
Copy link
Contributor

Pinging code owners for receiver/splunkhec: @atoulme. See Adding Labels via Comments if you do not have permissions to add labels yourself.

dmitryax pushed a commit that referenced this issue Oct 27, 2023
**Description:**
We would double-encode JSON objects as strings. We typically have
encoded strings as JSON strings as static responses to issues
encountered during data processing. Along the way, we adopted JSON
objects to match the Splunk Enterprise API. However, we didn't stop
encoding as JSON strings, resulting in double encoded JSON strings.

**Link to tracking Issue:**
Fixes #27604 

**Testing:**
Unit test changes.
sigilioso pushed a commit to carlossscastro/opentelemetry-collector-contrib that referenced this issue Oct 27, 2023
…telemetry#27606)

**Description:**
We would double-encode JSON objects as strings. We typically have
encoded strings as JSON strings as static responses to issues
encountered during data processing. Along the way, we adopted JSON
objects to match the Splunk Enterprise API. However, we didn't stop
encoding as JSON strings, resulting in double encoded JSON strings.

**Link to tracking Issue:**
Fixes open-telemetry#27604 

**Testing:**
Unit test changes.
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this issue Nov 12, 2023
…telemetry#27606)

**Description:**
We would double-encode JSON objects as strings. We typically have
encoded strings as JSON strings as static responses to issues
encountered during data processing. Along the way, we adopted JSON
objects to match the Splunk Enterprise API. However, we didn't stop
encoding as JSON strings, resulting in double encoded JSON strings.

**Link to tracking Issue:**
Fixes open-telemetry#27604 

**Testing:**
Unit test changes.
RoryCrispin pushed a commit to ClickHouse/opentelemetry-collector-contrib that referenced this issue Nov 24, 2023
…telemetry#27606)

**Description:**
We would double-encode JSON objects as strings. We typically have
encoded strings as JSON strings as static responses to issues
encountered during data processing. Along the way, we adopted JSON
objects to match the Splunk Enterprise API. However, we didn't stop
encoding as JSON strings, resulting in double encoded JSON strings.

**Link to tracking Issue:**
Fixes open-telemetry#27604 

**Testing:**
Unit test changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working receiver/splunkhec
Projects
None yet
2 participants