Skip to content
This repository was archived by the owner on Jun 2, 2022. It is now read-only.

HTTP/JSON exporter#1

Draft
tnevolin wants to merge 58 commits intomainfrom
feature/opentelemetry-java/3651
Draft

HTTP/JSON exporter#1
tnevolin wants to merge 58 commits intomainfrom
feature/opentelemetry-java/3651

Conversation

@tnevolin
Copy link
Copy Markdown

@tnevolin tnevolin commented Sep 27, 2021

This is copy of the original HTTP/protobuf exporter modified to convert message body to protobuf/JSON instead of protobuf/binary.

@carlosalberto
Copy link
Copy Markdown

carlosalberto commented Sep 28, 2021

Hey,

I saw JsonProtoRequestBody producing JSON but I don't see the class being actually called anywhere. Is its usage indirect or implicit?

Also, it's important to know:

  1. How does this compare to how JS is currently exporting their JSON data? They currently use the out of the box JSON utility as seen here: https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-exporter-otlp-http/src/platform/browser/OTLPExporterBrowserBase.ts#L77

  2. Did you test this against Lightstep? Or against any specific component?

ALSO: When creating a PR it's always useful to write a summary of the changes, e.g. this is a copy of the original HTTP/proto exporter with changes in line X and XX to mutate data to JSON, etc.

@tnevolin
Copy link
Copy Markdown
Author

I saw JsonProtoRequestBody producing JSON but I don't see the class being actually called anywhere. Is its usage indirect or implicit?

Updated.
RequestBody requestBody = new JsonProtoRequestBody(exportRequest);

Sorry. That was a result of my back and forth experiments on structuring the component. Initially, I thought creating a completely new one under http-json directory but decided to go light for POC.

@tnevolin
Copy link
Copy Markdown
Author

  1. How does this compare to how JS is currently exporting their JSON data? They currently use the out of the box JSON utility as seen here: https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-exporter-otlp-http/src/platform/browser/OTLPExporterBrowserBase.ts#L77

Cannot answer right now. You are right that JS exporter uses explicit JS methods. Whereas Java uses writeJsonTo method. The output definitely can be different as these are two completely different project and different languages.

@tnevolin
Copy link
Copy Markdown
Author

2. Did you test this against Lightstep? Or against any specific component?

No. I am trying to set up testing environment locally using collector. If you know any easy and quick way to test it without creating a package - let me know.

tnevolin added a commit that referenced this pull request Oct 19, 2021
codeboten pushed a commit that referenced this pull request Jun 2, 2022
open-telemetry#3770)

* Replaced hardcoded localhost with OS resolved localhost name in tests.

* Replaced hardcoded localhost with OS resolved localhost name in tests. open-telemetry#2

* retrigger checks #1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants