@perses-dev/core 0.51.0-beta.1 → 0.51.0-rc.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.
Files changed (45) hide show
  1. package/dist/cjs/model/index.js +1 -0
  2. package/dist/cjs/model/otlp/common/v1/common.js +17 -0
  3. package/dist/cjs/model/otlp/index.js +77 -0
  4. package/dist/cjs/model/otlp/resource/v1/resource.js +16 -0
  5. package/dist/cjs/model/otlp/trace/v1/trace.js +36 -0
  6. package/dist/cjs/model/trace-data.js +4 -23
  7. package/dist/cjs/schema/secret.js +38 -1
  8. package/dist/model/index.d.ts +1 -0
  9. package/dist/model/index.d.ts.map +1 -1
  10. package/dist/model/index.js +1 -0
  11. package/dist/model/index.js.map +1 -1
  12. package/dist/model/otlp/common/v1/common.d.ts +19 -0
  13. package/dist/model/otlp/common/v1/common.d.ts.map +1 -0
  14. package/dist/model/otlp/common/v1/common.js +16 -0
  15. package/dist/model/otlp/common/v1/common.js.map +1 -0
  16. package/dist/model/otlp/index.d.ts +4 -0
  17. package/dist/model/otlp/index.d.ts.map +1 -0
  18. package/dist/model/otlp/index.js +17 -0
  19. package/dist/model/otlp/index.js.map +1 -0
  20. package/dist/model/otlp/resource/v1/resource.d.ts +5 -0
  21. package/dist/model/otlp/resource/v1/resource.d.ts.map +1 -0
  22. package/dist/model/otlp/resource/v1/resource.js +16 -0
  23. package/dist/model/otlp/resource/v1/resource.js.map +1 -0
  24. package/dist/model/otlp/trace/v1/trace.d.ts +38 -0
  25. package/dist/model/otlp/trace/v1/trace.d.ts.map +1 -0
  26. package/dist/model/otlp/trace/v1/trace.js +17 -0
  27. package/dist/model/otlp/trace/v1/trace.js.map +1 -0
  28. package/dist/model/secrets.d.ts +10 -0
  29. package/dist/model/secrets.d.ts.map +1 -1
  30. package/dist/model/secrets.js.map +1 -1
  31. package/dist/model/time-series-data.d.ts +2 -2
  32. package/dist/model/time-series-data.d.ts.map +1 -1
  33. package/dist/model/time-series-data.js.map +1 -1
  34. package/dist/model/time-series-queries.d.ts +7 -0
  35. package/dist/model/time-series-queries.d.ts.map +1 -1
  36. package/dist/model/time-series-queries.js.map +1 -1
  37. package/dist/model/trace-data.d.ts +2 -61
  38. package/dist/model/trace-data.d.ts.map +1 -1
  39. package/dist/model/trace-data.js +0 -5
  40. package/dist/model/trace-data.js.map +1 -1
  41. package/dist/schema/secret.d.ts +457 -0
  42. package/dist/schema/secret.d.ts.map +1 -1
  43. package/dist/schema/secret.js +38 -1
  44. package/dist/schema/secret.js.map +1 -1
  45. package/package.json +1 -1
@@ -1,63 +1,4 @@
1
- /**
2
- * Common types
3
- */
4
- export interface TraceAttribute {
5
- key: string;
6
- value: TraceAttributeValue;
7
- }
8
- export type TraceAttributeValue = {
9
- stringValue: string;
10
- } | {
11
- intValue: string;
12
- } | {
13
- boolValue: boolean;
14
- } | {
15
- arrayValue: {
16
- values: TraceAttributeValue[];
17
- };
18
- };
19
- /**
20
- * An entire trace
21
- */
22
- export interface Trace {
23
- rootSpan: Span;
24
- }
25
- export interface TraceResource {
26
- serviceName: string;
27
- attributes: TraceAttribute[];
28
- }
29
- export interface TraceScope {
30
- name: string;
31
- }
32
- export interface Span {
33
- resource: TraceResource;
34
- scope: TraceScope;
35
- parentSpan?: Span;
36
- /** child spans, sorted by startTime */
37
- childSpans: Span[];
38
- traceId: string;
39
- spanId: string;
40
- parentSpanId?: string;
41
- name: string;
42
- kind: string;
43
- startTimeUnixMs: number;
44
- endTimeUnixMs: number;
45
- attributes: TraceAttribute[];
46
- events: SpanEvent[];
47
- status?: SpanStatus;
48
- }
49
- export interface SpanEvent {
50
- timeUnixMs: number;
51
- name: string;
52
- attributes: TraceAttribute[];
53
- }
54
- export interface SpanStatus {
55
- code?: typeof SpanStatusUnset | typeof SpanStatusOk | typeof SpanStatusError;
56
- message?: string;
57
- }
58
- export declare const SpanStatusUnset = "STATUS_CODE_UNSET";
59
- export declare const SpanStatusOk = "STATUS_CODE_OK";
60
- export declare const SpanStatusError = "STATUS_CODE_ERROR";
1
+ import { TracesData } from './otlp/trace/v1/trace';
61
2
  /**
62
3
  * Partial trace information returned by search endpoint
63
4
  */
@@ -82,7 +23,7 @@ export interface ServiceStats {
82
23
  * If the query contains a TraceQL query, the 'searchResult' attribute will contain the search results.
83
24
  */
84
25
  export interface TraceData {
85
- trace?: Trace;
26
+ trace?: TracesData;
86
27
  searchResult?: TraceSearchResult[];
87
28
  metadata?: TraceMetaData;
88
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"trace-data.d.ts","sourceRoot":"","sources":["../../src/model/trace-data.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,mBAAmB,CAAC;CAC5B;AAED,MAAM,MAAM,mBAAmB,GAC3B;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GACvB;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GACpB;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,GACtB;IAAE,UAAU,EAAE;QAAE,MAAM,EAAE,mBAAmB,EAAE,CAAA;KAAE,CAAA;CAAE,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,IAAI,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,IAAI;IACnB,QAAQ,EAAE,aAAa,CAAC;IACxB,KAAK,EAAE,UAAU,CAAC;IAClB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,uCAAuC;IACvC,UAAU,EAAE,IAAI,EAAE,CAAC;IAEnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;I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,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEvD"}
1
+ {"version":3,"file":"trace-data.d.ts","sourceRoot":"","sources":["../../src/model/trace-data.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAEnC,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEvD"}
@@ -10,11 +10,6 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- /**
14
- * Common types
15
- */ export const SpanStatusUnset = 'STATUS_CODE_UNSET';
16
- export const SpanStatusOk = 'STATUS_CODE_OK';
17
- export const SpanStatusError = 'STATUS_CODE_ERROR';
18
13
  export function isValidTraceId(traceId) {
19
14
  return /^[0-9a-fA-F]+$/.test(traceId);
20
15
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/model/trace-data.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * Common types\n */\nexport interface TraceAttribute {\n key: string;\n value: TraceAttributeValue;\n}\n\nexport type TraceAttributeValue =\n | { stringValue: string }\n | { intValue: string }\n | { boolValue: boolean }\n | { arrayValue: { values: TraceAttributeValue[] } };\n\n/**\n * An entire trace\n */\nexport interface Trace {\n rootSpan: Span;\n}\n\nexport interface TraceResource {\n serviceName: string;\n attributes: TraceAttribute[];\n}\n\nexport interface TraceScope {\n name: string;\n}\n\nexport interface Span {\n resource: TraceResource;\n scope: TraceScope;\n parentSpan?: Span;\n /** child spans, sorted by startTime */\n childSpans: Span[];\n\n traceId: string;\n spanId: string;\n parentSpanId?: string;\n name: string;\n kind: string;\n startTimeUnixMs: number;\n endTimeUnixMs: number;\n attributes: TraceAttribute[];\n events: SpanEvent[];\n status?: SpanStatus;\n}\n\nexport interface SpanEvent {\n timeUnixMs: number;\n name: string;\n attributes: TraceAttribute[];\n}\n\nexport interface SpanStatus {\n code?: typeof SpanStatusUnset | typeof SpanStatusOk | typeof SpanStatusError;\n message?: string;\n}\n\nexport const SpanStatusUnset = 'STATUS_CODE_UNSET';\nexport const SpanStatusOk = 'STATUS_CODE_OK';\nexport const SpanStatusError = 'STATUS_CODE_ERROR';\n\n/**\n * Partial trace information returned by search endpoint\n */\nexport interface TraceSearchResult {\n traceId: string;\n rootServiceName: string;\n rootTraceName: string;\n startTimeUnixMs: number;\n durationMs: number;\n serviceStats: Record<string, ServiceStats>;\n}\n\nexport interface ServiceStats {\n spanCount: number;\n /** number of spans with errors, unset if zero */\n errorCount?: number;\n}\n\n/**\n * A generalized data-model that will be used by Panel components\n * to display traces.\n *\n * If the query contains a valid trace ID, the 'trace' attribute will contain the entire trace.\n * If the query contains a TraceQL query, the 'searchResult' attribute will contain the search results.\n */\nexport interface TraceData {\n trace?: Trace;\n searchResult?: TraceSearchResult[];\n\n metadata?: TraceMetaData;\n}\n\nexport interface TraceMetaData {\n executedQueryString?: string;\n}\n\nexport function isValidTraceId(traceId: string): boolean {\n return /^[0-9a-fA-F]+$/.test(traceId);\n}\n"],"names":["SpanStatusUnset","SpanStatusOk","SpanStatusError","isValidTraceId","traceId","test"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC;;CAEC,GA0DD,OAAO,MAAMA,kBAAkB,oBAAoB;AACnD,OAAO,MAAMC,eAAe,iBAAiB;AAC7C,OAAO,MAAMC,kBAAkB,oBAAoB;AAsCnD,OAAO,SAASC,eAAeC,OAAe;IAC5C,OAAO,iBAAiBC,IAAI,CAACD;AAC/B"}
1
+ {"version":3,"sources":["../../src/model/trace-data.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { TracesData } from './otlp/trace/v1/trace';\n\n/**\n * Partial trace information returned by search endpoint\n */\nexport interface TraceSearchResult {\n traceId: string;\n rootServiceName: string;\n rootTraceName: string;\n startTimeUnixMs: number;\n durationMs: number;\n serviceStats: Record<string, ServiceStats>;\n}\n\nexport interface ServiceStats {\n spanCount: number;\n /** number of spans with errors, unset if zero */\n errorCount?: number;\n}\n\n/**\n * A generalized data-model that will be used by Panel components\n * to display traces.\n *\n * If the query contains a valid trace ID, the 'trace' attribute will contain the entire trace.\n * If the query contains a TraceQL query, the 'searchResult' attribute will contain the search results.\n */\nexport interface TraceData {\n trace?: TracesData;\n searchResult?: TraceSearchResult[];\n\n metadata?: TraceMetaData;\n}\n\nexport interface TraceMetaData {\n executedQueryString?: string;\n}\n\nexport function isValidTraceId(traceId: string): boolean {\n return /^[0-9a-fA-F]+$/.test(traceId);\n}\n"],"names":["isValidTraceId","traceId","test"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAwCjC,OAAO,SAASA,eAAeC,OAAe;IAC5C,OAAO,iBAAiBC,IAAI,CAACD;AAC/B"}