-
Notifications
You must be signed in to change notification settings - Fork 819
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
Collector exporter #552
Collector exporter #552
Conversation
Codecov Report
@@ Coverage Diff @@
## master #552 +/- ##
==========================================
- Coverage 90.16% 89.94% -0.22%
==========================================
Files 146 168 +22
Lines 7390 8238 +848
Branches 631 739 +108
==========================================
+ Hits 6663 7410 +747
- Misses 727 828 +101
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great 💯, added few minor comments in the first pass. I will spend some time today to review the rest of the conversation stuff.
packages/opentelemetry-exporter-collector/src/platform/node/sendSpans.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/platform/node/sendSpans.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/platform/node/sendSpans.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addded a few more comments.
packages/opentelemetry-core/src/platform/browser/span-id-to-base64.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-core/src/platform/node/span-id-to-base64.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/test/common/transform.test.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/CollectorExporter.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/CollectorExporter.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/platform/node/sendSpans.ts
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/platform/node/sendSpans.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/platform/browser/sendSpans.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/platform/browser/sendSpans.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool! Have some comments but awesome to see this coming together.
packages/opentelemetry-core/src/platform/browser/hex-to-base64.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/CollectorExporter.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/platform/browser/sendSpans.ts
Outdated
Show resolved
Hide resolved
annotation.attributes = attributes; | ||
} | ||
|
||
// const messageEvent: MessageEvent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we open a tracking issue for us to add message events? @mayurkale22 / @bg451 is that in the spec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK we can use event.attributes
to assign the MessageEventType (RECEIVED
or SEND
) and uncompressedSize
and compressedSize
bytes instead of adding dedicated api for message event. Maybe you should open an issue to define semantic conversions for all of these attributes.
packages/opentelemetry-core/src/platform/browser/hex-to-base64.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-core/src/platform/browser/hex-to-base64.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/CollectorExporter.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/platform/node/sendSpans.ts
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/platform/node/sendSpans.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/platform/node/sendSpans.ts
Show resolved
Hide resolved
annotation.attributes = attributes; | ||
} | ||
|
||
// const messageEvent: MessageEvent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK we can use event.attributes
to assign the MessageEventType (RECEIVED
or SEND
) and uncompressedSize
and compressedSize
bytes instead of adding dedicated api for message event. Maybe you should open an issue to define semantic conversions for all of these attributes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work @obecny!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, added a few minor comments. Great work! 💯
packages/opentelemetry-exporter-collector/src/CollectorExporter.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/CollectorExporter.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/platform/browser/sendSpans.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/platform/browser/sendSpans.ts
Show resolved
Hide resolved
packages/opentelemetry-exporter-collector/src/platform/node/sendSpans.ts
Show resolved
Hide resolved
@open-telemetry/javascript-approvers Please review when you get a chance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Which problem is this PR solving?
Short description of the changes
It adds new
CollectorExporter
for web and node. It will export spans either from web or node toopentelemetry-collector
using theopencensus receiver
. There is onedocker compose
file insideexamples/basic-tracer-node/docker
.