-
Notifications
You must be signed in to change notification settings - Fork 832
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
feat(otlp-transformer)!: remove internal types and functions from public API #5200
feat(otlp-transformer)!: remove internal types and functions from public API #5200
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5200 +/- ##
==========================================
- Coverage 94.59% 94.58% -0.02%
==========================================
Files 314 314
Lines 7993 7993
Branches 1611 1611
==========================================
- Hits 7561 7560 -1
- Misses 432 433 +1
|
18e243b
to
73cf777
Compare
73cf777
to
5a76cd8
Compare
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.
The otlp-transformer/README.md still describes using:
import {
createExportTraceServiceRequest,
createExportMetricsServiceRequest,
createExportLogsServiceRequest,
} from '@opentelemetry/otlp-transformer';
...
That should be updated, but doesn't have to block this.
@trentm good point - addressed in fb0d6dc 🙂 I'll also hold of on merging this until I have a PR for open-telemetry/opentelemetry-js-contrib#2565 so that we don't run into trouble when updating the contrib repo where these types are used in some tests. |
Ah, I hadn't checked for usage in the contrib repo. |
added the |
Which problem is this PR solving?
Removes all types that don't need to be exported anymore from the public interface. They were previously private as the serialization was handled by exporters, but that has changed since #4581 and #4542 were merged. Now we don't need to make the intermediate representation public anymore since the interface takes the SDKs representation and then directly returns an
Uint8Array
that can immediately be sent.Reducing the public API in this way is a key part to making
@opentelemetry/otlp-transformer
stable, see #4582Fixes #4583
Breaking changes
OtlpEncodingOptions
IKeyValueList
IKeyValue
IInstrumentationScope
IArrayValue
LongBits
IAnyValue
Fixed64
SpanContextEncodeFunction
toLongBits
OptionalSpanContextEncodeFunction
getOtlpEncoder
Encoder
HrTimeEncodeFunction
encodeAsLongBits
encodeAsString
hrTimeToNanos
IValueAtQuantile
ISummaryDataPoint
ISummary
ISum
IScopeMetrics
IResourceMetrics
INumberDataPoint
IHistogramDataPoint
IHistogram
IExponentialHistogramDataPoint
IExponentialHistogram
IMetric
IGauge
IExemplar
EAggregationTemporality
IExportMetricsServiceRequest
IBuckets
IResource
IStatus
EStatusCode
ILink
IEvent
IScopeSpans
ISpan
IResourceSpans
ESpanKind
IExportTraceServiceRequest
IScopeLogs
IExportLogsServiceRequest
IResourceLogs
ILogRecord
ESeverityNumber
Type of change
How Has This Been Tested?