Skip to content

Commit

Permalink
Step #1 - updating all the rollup configs to account for the export c…
Browse files Browse the repository at this point in the history
…hanges with the latest opentelemetry:

- CanonicalCode is now SpanStatusCode
- span propagation uses some new functions (set|get)spanContext, (set|get)Span. This isn't used directly in client code but the opentelemetry is a bit of a leaky abstraction right now
  • Loading branch information
richardpark-msft committed Mar 11, 2021
1 parent 461643a commit 388d603
Show file tree
Hide file tree
Showing 39 changed files with 383 additions and 66 deletions.
9 changes: 8 additions & 1 deletion common/tools/dev-tool/src/config/rollup.base.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,14 @@ function makeBrowserTestConfig() {
chai: ["version", "use", "util", "config", "expect", "should", "assert"],
// OpenTelemetry uses an __exportStar downleveled helper function to
// declare its exports, and so we have to add them here as well.
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"SpanStatusCode",
"getSpanContext"
]
}
}),
json(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,14 @@ export function browserConfig(test = false) {
cjs({
namedExports: {
chai: ["assert"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanKind",
"TraceFlags",
"getSpan",
"setSpan",
"SpanStatusCode",
"getSpanContext"
]
}
}),
viz({ filename: "dist-browser/browser-stats.html", sourcemap: false })
Expand Down
9 changes: 8 additions & 1 deletion sdk/appconfiguration/app-configuration/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,14 @@ export function browserConfig(test = false) {
chai: ["assert", "expect", "use"],
assert: ["ok", "equal", "strictEqual", "deepEqual", "fail", "throws", "notEqual"],
events: ["EventEmitter"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
}),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,14 @@ export function browserConfig(test = false) {
namedExports: {
chai: ["assert"],
events: ["EventEmitter"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
}),
viz({ filename: "dist-browser/browser-stats.html", sourcemap: false })
Expand Down
9 changes: 8 additions & 1 deletion sdk/communication/communication-chat/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,14 @@ export function browserConfig(test = false) {
chai: ["assert"],
events: ["EventEmitter"],
"@azure/communication-signaling": ["CommunicationSignalingClient", "SignalingClient"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
}),
viz({ filename: "dist-browser/browser-stats.html", sourcemap: false })
Expand Down
9 changes: 8 additions & 1 deletion sdk/communication/communication-common/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,14 @@ export function browserConfig(test = false) {
namedExports: {
chai: ["assert", "use"],
events: ["EventEmitter"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
}),
viz({ filename: "dist-browser/browser-stats.html", sourcemap: false })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,14 @@ export function browserConfig(test = false) {
namedExports: {
chai: ["assert"],
events: ["EventEmitter"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
}),
viz({ filename: "dist-browser/browser-stats.html", sourcemap: false })
Expand Down
9 changes: 8 additions & 1 deletion sdk/communication/communication-sms/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,14 @@ export function browserConfig(test = false) {
namedExports: {
chai: ["assert"],
events: ["EventEmitter"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
}),
viz({ filename: "dist-browser/browser-stats.html", sourcemap: false })
Expand Down
9 changes: 8 additions & 1 deletion sdk/core/core-client/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ export function browserConfig(test = false) {
cjs({
namedExports: {
chai: ["assert"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
}),
viz({ filename: "dist-browser/browser-stats.html", sourcemap: false })
Expand Down
9 changes: 8 additions & 1 deletion sdk/core/core-http/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ export function browserConfig(test = false, production = false) {
namedExports: {
chai: ["assert", "AssertionError", "should", "expect"],
events: ["EventEmitter"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
}),
viz({ filename: "dist-browser/browser-stats.html", sourcemap: false })
Expand Down
9 changes: 8 additions & 1 deletion sdk/core/core-lro/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,14 @@ export function browserConfig(test = false) {
cjs({
namedExports: {
assert: ["ok", "equal", "strictEqual"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
})
]
Expand Down
10 changes: 9 additions & 1 deletion sdk/core/core-rest-pipeline/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,15 @@ export function browserConfig(test = false) {
cjs({
namedExports: {
chai: ["assert"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext",
"setSpanContext"
]
}
}),
viz({ filename: "dist-browser/browser-stats.html", sourcemap: false })
Expand Down
9 changes: 8 additions & 1 deletion sdk/core/core-tracing/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,14 @@ export function browserConfig(test = false) {
}),
cjs({
namedExports: {
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"],
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
],
assert: ["ok", "fail", "equal", "deepEqual", "deepStrictEqual", "strictEqual"]
}
}),
Expand Down
9 changes: 8 additions & 1 deletion sdk/core/core-xml/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ export function browserConfig(test = false) {
cjs({
namedExports: {
chai: ["assert"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
}),
viz({ filename: "dist-browser/browser-stats.html", sourcemap: false })
Expand Down
9 changes: 8 additions & 1 deletion sdk/digitaltwins/digital-twins-core/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@ export function browserConfig(test = false) {
chai: ["assert", "expect", "use"],
assert: ["ok", "equal", "strictEqual", "deepEqual", "fail", "throws", "notEqual"],
events: ["EventEmitter"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
}),

Expand Down
9 changes: 8 additions & 1 deletion sdk/eventgrid/eventgrid/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ export function browserConfig(test = false, production = false) {
namedExports: {
chai: ["assert", "expect", "use"],
events: ["EventEmitter"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
}),
viz({ filename: "dist-browser/browser-stats.html", sourcemap: false })
Expand Down
10 changes: 9 additions & 1 deletion sdk/eventhub/event-hubs/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,15 @@ export function browserConfig(test = false) {

cjs({
namedExports: {
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"],
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext",
"setSpanContext"
],
chai: ["should", "assert"],
assert: ["equal", "deepEqual", "notEqual"]
}
Expand Down
9 changes: 8 additions & 1 deletion sdk/identity/identity/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,14 @@ export function browserConfig(test = false) {
cjs({
namedExports: {
events: ["EventEmitter"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
}),
viz({ filename: "dist-browser/browser-stats.html", sourcemap: false })
Expand Down
9 changes: 8 additions & 1 deletion sdk/keyvault/keyvault-admin/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,14 @@ export function browserConfig(test = false) {
namedExports: {
chai: ["assert", "use"],
assert: ["ok", "equal", "strictEqual", "deepEqual", "isRejected"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
})
]
Expand Down
9 changes: 8 additions & 1 deletion sdk/keyvault/keyvault-certificates/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,14 @@ export function browserConfig(test = false) {
cjs({
namedExports: {
assert: ["ok", "equal", "strictEqual", "deepEqual"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
})
]
Expand Down
9 changes: 8 additions & 1 deletion sdk/keyvault/keyvault-keys/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,14 @@ export function browserConfig(test = false) {
namedExports: {
chai: ["assert", "use"],
assert: ["ok", "equal", "strictEqual", "deepEqual", "throws", "isRejected"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
})
]
Expand Down
9 changes: 8 additions & 1 deletion sdk/keyvault/keyvault-secrets/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,14 @@ export function browserConfig(test = false) {
namedExports: {
chai: ["assert"],
assert: ["ok", "equal", "strictEqual", "deepEqual", "exists"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
})
]
Expand Down
9 changes: 8 additions & 1 deletion sdk/quantum/quantum-jobs/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@ export function browserConfig(test = false) {
namedExports: {
events: ["EventEmitter"],
chai: ["assert"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
}),
// disable the plugin in the rollup config to cut-out errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,14 @@ export function browserConfig(test = false, production = false) {
cjs({
namedExports: {
chai: ["assert", "expect", "use"],
"@opentelemetry/api": ["CanonicalCode", "SpanKind", "TraceFlags"]
"@opentelemetry/api": [
"SpanStatusCode",
"SpanKind",
"TraceFlags",
"setSpan",
"getSpan",
"getSpanContext"
]
}
}),
inject({
Expand Down
Loading

0 comments on commit 388d603

Please sign in to comment.