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

Is a 204 status code error something I should worry about when using opentelemetry-cpp. #2632

Closed
Odinaka-git opened this issue Apr 9, 2024 · 1 comment · Fixed by #2712
Closed
Assignees
Labels
bug Something isn't working Stale triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@Odinaka-git
Copy link

I've built an application that sends telemetry data to a grafana cloud stack. The application sends both logs and traces. And I can query the traces and logs I send to grafana without any issues. The problem is though, when I send traces to grafana, I get a status code of 200, and opentelemetry-cpp logs a success message in cout. On the other hand for logs, I get a 204 status code which opentelemetry-cpp logs as an error message in cout. From my understanding of http status codes the 200 status codes are successes, plus my logs show up in the grafana data source, and I can query them without any issues. I was wondering if I could get confirmation on whether it's something I should worry about. And if it's something trivial, is there a way I can stop these logs from showing up in std::out.

Describe your environment
I'm using windows 11. And My IDE of choice is visual studio.

The log message in question

[Debug] File: C:\.conan\e118c5\1\src\exporters\otlp\src\otlp_http_client.cc:175 [OTLP HTTP Client] Session state: session created
[Debug] File: C:\.conan\e118c5\1\src\exporters\otlp\src\otlp_http_client.cc:189 [OTLP HTTP Client] Session state: connecting to peer
[Debug] File: C:\.conan\e118c5\1\src\exporters\otlp\src\otlp_http_client.cc:750 [OTLP HTTP Client] Waiting for response from <Grafana OTLP Endpoint>/otlp/v1/logs (timeout = 10000 milliseconds)
[Debug] File: C:\.conan\e118c5\1\src\exporters\otlp\src\otlp_http_client.cc:207 [OTLP HTTP Client] Session state: connected
[Debug] File: C:\.conan\e118c5\1\src\exporters\otlp\src\otlp_http_client.cc:214 [OTLP HTTP Client] Session state: sending request
[Debug] File: C:\.conan\e118c5\1\src\exporters\otlp\src\otlp_http_client.cc:232 [OTLP HTTP Client] Session state: response received
[Error] File: C:\.conan\e118c5\1\src\exporters\otlp\src\otlp_http_client.cc:103 [OTLP HTTP Client] Export failed, Status:204, Header:   Date: Tue, 09 Apr,Body:08:30:05 GMT
[Error] File: C:\.conan\e118c5\1\src\exporters\otlp\src\otlp_http_log_record_exporter.cc:124 [OTLP HTTP Client] ERROR: Export 1 log(s) error: 1

What is the expected behavior?
I didn't expect it to be logged as an error.

Additional context
Non , but if there's any information you need from me, please ask.

@Odinaka-git Odinaka-git added the bug Something isn't working label Apr 9, 2024
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Apr 9, 2024
@marcalff marcalff added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 17, 2024
@marcalff marcalff self-assigned this Apr 17, 2024
Copy link

This issue was marked as stale due to lack of activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants