@dreamhorizonorg/pulse-react-native 0.0.5 → 0.0.6
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/android/build.gradle +1 -1
- package/android/src/main/java/com/pulsereactnativeotel/Pulse.kt +2 -2
- package/lib/typescript/plugin/src/types.d.ts +1 -1
- package/lib/typescript/plugin/src/types.d.ts.map +1 -1
- package/lib/typescript/plugin/src/utils.d.ts +1 -1
- package/lib/typescript/plugin/src/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/plugin/build/types.d.ts +1 -1
- package/plugin/build/utils.d.ts +1 -1
- package/plugin/build/utils.js +2 -2
- package/plugin/build/withAndroidPulse.js +2 -2
package/android/build.gradle
CHANGED
|
@@ -23,7 +23,7 @@ public object Pulse : PulseSDK by PulseSDK.INSTANCE {
|
|
|
23
23
|
public override fun initialize(
|
|
24
24
|
application: Application,
|
|
25
25
|
endpointBaseUrl: String,
|
|
26
|
-
|
|
26
|
+
projectId: String,
|
|
27
27
|
endpointHeaders: Map<String, String>,
|
|
28
28
|
spanEndpointConnectivity: EndpointConnectivity,
|
|
29
29
|
logEndpointConnectivity: EndpointConnectivity,
|
|
@@ -73,7 +73,7 @@ public object Pulse : PulseSDK by PulseSDK.INSTANCE {
|
|
|
73
73
|
PulseSDK.INSTANCE.initialize(
|
|
74
74
|
application = application,
|
|
75
75
|
endpointBaseUrl = endpointBaseUrl,
|
|
76
|
-
|
|
76
|
+
projectId = projectId,
|
|
77
77
|
endpointHeaders = endpointHeaders,
|
|
78
78
|
spanEndpointConnectivity = spanEndpointConnectivity,
|
|
79
79
|
logEndpointConnectivity = logEndpointConnectivity,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../plugin/src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,EAA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AC;CACH"}
|
|
@@ -3,7 +3,7 @@ export declare const ATTRIBUTES_IMPORT = "import io.opentelemetry.api.common.Att
|
|
|
3
3
|
import type { PulsePluginProps } from './types';
|
|
4
4
|
export declare function buildPulseInitializationCode(options: {
|
|
5
5
|
endpointBaseUrl: string;
|
|
6
|
-
|
|
6
|
+
projectId: string;
|
|
7
7
|
endpointHeaders?: Record<string, string>;
|
|
8
8
|
configEndpointUrl?: string;
|
|
9
9
|
globalAttributes?: PulsePluginProps['globalAttributes'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../plugin/src/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,4CAA4C,CAAC;AAEtE,eAAO,MAAM,iBAAiB,qGACsE,CAAC;AAErG,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,SAAS,CAAC;AA6DjE,wBAAgB,4BAA4B,CAAC,OAAO,EAAE;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../plugin/src/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,4CAA4C,CAAC;AAEtE,eAAO,MAAM,iBAAiB,qGACsE,CAAC;AAErG,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,SAAS,CAAC;AA6DjE,wBAAgB,4BAA4B,CAAC,OAAO,EAAE;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;IACxD,eAAe,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;CACvD,GAAG,MAAM,CAmET"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dreamhorizonorg/pulse-react-native",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Production-grade observability SDK for React Native applications with OpenTelemetry support. Real-time monitoring, error tracking, performance insights, and distributed tracing.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
package/plugin/build/types.d.ts
CHANGED
package/plugin/build/utils.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const ATTRIBUTES_IMPORT = "import io.opentelemetry.api.common.Att
|
|
|
3
3
|
import type { PulsePluginProps } from './types';
|
|
4
4
|
export declare function buildPulseInitializationCode(options: {
|
|
5
5
|
endpointBaseUrl: string;
|
|
6
|
-
|
|
6
|
+
projectId: string;
|
|
7
7
|
endpointHeaders?: Record<string, string>;
|
|
8
8
|
configEndpointUrl?: string;
|
|
9
9
|
globalAttributes?: PulsePluginProps['globalAttributes'];
|
package/plugin/build/utils.js
CHANGED
|
@@ -59,9 +59,9 @@ function buildGlobalAttributesLambda(attributes) {
|
|
|
59
59
|
return `{\n Attributes.builder().apply {\n${formatted}\n }.build()\n }`;
|
|
60
60
|
}
|
|
61
61
|
function buildPulseInitializationCode(options) {
|
|
62
|
-
const { endpointBaseUrl,
|
|
62
|
+
const { endpointBaseUrl, projectId, endpointHeaders, configEndpointUrl, globalAttributes, instrumentation, } = options;
|
|
63
63
|
const params = [];
|
|
64
|
-
params.push(`
|
|
64
|
+
params.push(`projectId = "${projectId}"`);
|
|
65
65
|
if (endpointHeaders && Object.keys(endpointHeaders).length > 0) {
|
|
66
66
|
params.push(`endpointHeaders = ${buildEndpointHeadersMap(endpointHeaders)}`);
|
|
67
67
|
}
|
|
@@ -7,7 +7,7 @@ const utils_1 = require("./utils");
|
|
|
7
7
|
const withAndroidPulse = (config, props) => {
|
|
8
8
|
return (0, config_plugins_1.withMainApplication)(config, (modConfig) => {
|
|
9
9
|
try {
|
|
10
|
-
const { endpointBaseUrl,
|
|
10
|
+
const { endpointBaseUrl, projectId, endpointHeaders, configEndpointUrl, globalAttributes, instrumentation, } = props;
|
|
11
11
|
// 1. Add import statements
|
|
12
12
|
modConfig.modResults.contents = (0, generateCode_1.mergeContents)({
|
|
13
13
|
src: modConfig.modResults.contents,
|
|
@@ -29,7 +29,7 @@ const withAndroidPulse = (config, props) => {
|
|
|
29
29
|
}
|
|
30
30
|
const initCode = (0, utils_1.buildPulseInitializationCode)({
|
|
31
31
|
endpointBaseUrl,
|
|
32
|
-
|
|
32
|
+
projectId,
|
|
33
33
|
endpointHeaders,
|
|
34
34
|
configEndpointUrl,
|
|
35
35
|
globalAttributes,
|