spectrum-ts 1.8.0 → 1.9.0
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/dist/index.js +7 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1971,6 +1971,10 @@ import {
|
|
|
1971
1971
|
} from "@photon-ai/otel";
|
|
1972
1972
|
import z from "zod";
|
|
1973
1973
|
|
|
1974
|
+
// src/build-env.ts
|
|
1975
|
+
var SPECTRUM_SDK_VERSION = "local";
|
|
1976
|
+
var SPECTRUM_BUILD_ENV = "development";
|
|
1977
|
+
|
|
1974
1978
|
// src/utils/store.ts
|
|
1975
1979
|
var isRecordObject = (value) => {
|
|
1976
1980
|
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
@@ -2026,9 +2030,6 @@ function createStore() {
|
|
|
2026
2030
|
};
|
|
2027
2031
|
}
|
|
2028
2032
|
|
|
2029
|
-
// src/version.ts
|
|
2030
|
-
var SPECTRUM_SDK_VERSION = "1.8.0";
|
|
2031
|
-
|
|
2032
2033
|
// src/spectrum.ts
|
|
2033
2034
|
var PHOTON_OTEL_ENDPOINT = "https://otlp.photon.codes";
|
|
2034
2035
|
var lifecycleLog = createLogger("spectrum.lifecycle");
|
|
@@ -2058,7 +2059,9 @@ function bootstrapTelemetry(opts) {
|
|
|
2058
2059
|
const credential = `${opts.projectId}:${opts.projectSecret}`;
|
|
2059
2060
|
headers.Authorization = `Basic ${btoa(credential)}`;
|
|
2060
2061
|
}
|
|
2061
|
-
const resourceAttributes = {
|
|
2062
|
+
const resourceAttributes = {
|
|
2063
|
+
"deployment.environment": process.env.DEPLOYMENT_ENV ?? SPECTRUM_BUILD_ENV
|
|
2064
|
+
};
|
|
2062
2065
|
if (opts.projectId) {
|
|
2063
2066
|
resourceAttributes["spectrum.project_id"] = opts.projectId;
|
|
2064
2067
|
}
|