@azure/eventgrid 4.9.0 → 4.10.0-alpha.20220414.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/index.js +11 -18
- package/dist/index.js.map +1 -1
- package/dist-esm/src/eventGridClient.js +7 -16
- package/dist-esm/src/eventGridClient.js.map +1 -1
- package/dist-esm/src/generated/generatedClientContext.js +1 -1
- package/dist-esm/src/generated/generatedClientContext.js.map +1 -1
- package/dist-esm/src/tracing.js +5 -4
- package/dist-esm/src/tracing.js.map +1 -1
- package/package.json +9 -5
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
## 4.10.0 (Unreleased)
|
4
|
+
|
5
|
+
### Features Added
|
6
|
+
|
7
|
+
### Breaking Changes
|
8
|
+
|
9
|
+
### Bugs Fixed
|
10
|
+
|
11
|
+
### Other Changes
|
12
|
+
|
13
|
+
- Updated our `@azure/core-tracing` dependency to the latest version (1.0.0).
|
14
|
+
- Notable changes include Removal of `@opentelemetry/api` as a transitive dependency and ensuring that the active context is properly propagated.
|
15
|
+
- Customers who would like to continue using OpenTelemetry driven tracing should visit our [OpenTelemetry Instrumentation](https://www.npmjs.com/package/@azure/opentelemetry-instrumentation-azure-sdk) package for instructions.
|
16
|
+
|
3
17
|
## 4.9.0 (2022-04-07)
|
4
18
|
|
5
19
|
### Features Added
|
package/dist/index.js
CHANGED
@@ -7734,7 +7734,7 @@ class GeneratedClientContext extends coreClient__namespace.ServiceClient {
|
|
7734
7734
|
const defaults = {
|
7735
7735
|
requestContentType: "application/json; charset=utf-8"
|
7736
7736
|
};
|
7737
|
-
const packageDetails = `azsdk-js-eventgrid/4.
|
7737
|
+
const packageDetails = `azsdk-js-eventgrid/4.10.0`;
|
7738
7738
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
7739
7739
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
7740
7740
|
: `${packageDetails}`;
|
@@ -7882,12 +7882,13 @@ function cloudEventDistributedTracingEnricherPolicy() {
|
|
7882
7882
|
|
7883
7883
|
// Copyright (c) Microsoft Corporation.
|
7884
7884
|
/**
|
7885
|
-
*
|
7885
|
+
* A tracing client to handle spans.
|
7886
7886
|
* @internal
|
7887
7887
|
*/
|
7888
|
-
const
|
7889
|
-
packagePrefix: "Azure.Data.EventGrid",
|
7888
|
+
const tracingClient = coreTracing.createTracingClient({
|
7890
7889
|
namespace: "Microsoft.Messaging.EventGrid",
|
7890
|
+
packageName: "@azure/event-grid",
|
7891
|
+
packageVersion: "4.9.0",
|
7891
7892
|
});
|
7892
7893
|
|
7893
7894
|
// Copyright (c) Microsoft Corporation.
|
@@ -7933,31 +7934,23 @@ class EventGridPublisherClient {
|
|
7933
7934
|
* @param events - The events to send. The events should be in the schema used when constructing the client.
|
7934
7935
|
* @param options - Options to control the underlying operation.
|
7935
7936
|
*/
|
7936
|
-
|
7937
|
-
|
7938
|
-
try {
|
7937
|
+
send(events, options = {}) {
|
7938
|
+
return tracingClient.withSpan("EventGridPublisherClient.send", options, (updatedOptions) => {
|
7939
7939
|
switch (this.inputSchema) {
|
7940
7940
|
case "EventGrid": {
|
7941
|
-
return
|
7941
|
+
return this.client.publishEvents(this.endpointUrl, events.map(convertEventGridEventToModelType), updatedOptions);
|
7942
7942
|
}
|
7943
7943
|
case "CloudEvent": {
|
7944
|
-
return
|
7944
|
+
return this.client.publishCloudEventEvents(this.endpointUrl, events.map(convertCloudEventToModelType), updatedOptions);
|
7945
7945
|
}
|
7946
7946
|
case "Custom": {
|
7947
|
-
return
|
7947
|
+
return this.client.publishCustomEventEvents(this.endpointUrl, events, updatedOptions);
|
7948
7948
|
}
|
7949
7949
|
default: {
|
7950
7950
|
throw new Error(`Unknown input schema type '${this.inputSchema}'`);
|
7951
7951
|
}
|
7952
7952
|
}
|
7953
|
-
}
|
7954
|
-
catch (e) {
|
7955
|
-
span.setStatus({ code: coreTracing.SpanStatusCode.ERROR, message: e.message });
|
7956
|
-
throw e;
|
7957
|
-
}
|
7958
|
-
finally {
|
7959
|
-
span.end();
|
7960
|
-
}
|
7953
|
+
});
|
7961
7954
|
}
|
7962
7955
|
}
|
7963
7956
|
/**
|