@zuplo/cli 6.72.0 → 6.72.2
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/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-json-stringify/.github/dependabot.yml +42 -2
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-json-stringify/README.md +5 -5
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-json-stringify/index.js +4 -7
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-json-stringify/package.json +3 -3
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-json-stringify/test/additionalProperties.test.js +47 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-json-stringify/test/const.test.js +20 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-json-stringify/test/patternProperties.test.js +24 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/.gitattributes +2 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/.github/dependabot.yml +53 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/.github/workflows/ci.yml +154 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/LICENSE +30 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/README.md +152 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/benchmark/benchmark.mjs +159 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/benchmark/encoder.mjs +54 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/benchmark/equal.mjs +51 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/benchmark/non-simple-domain.mjs +22 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/benchmark/package.json +17 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +24 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/benchmark/ws-is-secure.mjs +65 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/eslint.config.js +6 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/index.js +405 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/lib/schemes.js +267 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/lib/utils.js +585 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/package.json +68 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/ajv.test.js +43 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/equal.test.js +168 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/fixtures/uri-js-parse.json +501 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +120 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/parse.test.js +325 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/resolve.test.js +87 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/rfc-3986.test.js +90 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/scheme-normalization.test.js +16 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/security-normalization.test.js +39 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/security-utf8-encoding.test.js +0 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/security.test.js +161 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/serialize.test.js +151 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/uri-js-compatibility.test.js +33 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/uri-js.test.js +912 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/util.test.js +47 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/tsconfig.json +10 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/types/index.d.ts +51 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/types/index.tst.ts +15 -0
- package/node_modules/@posthog/core/dist/index.d.ts +3 -0
- package/node_modules/@posthog/core/dist/index.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/index.js +133 -93
- package/node_modules/@posthog/core/dist/index.mjs +2 -1
- package/node_modules/@posthog/core/dist/metrics/index.d.ts +61 -0
- package/node_modules/@posthog/core/dist/metrics/index.d.ts.map +1 -0
- package/node_modules/@posthog/core/dist/metrics/index.js +326 -0
- package/node_modules/@posthog/core/dist/metrics/index.mjs +283 -0
- package/node_modules/@posthog/core/dist/metrics/metrics-utils.d.ts +41 -0
- package/node_modules/@posthog/core/dist/metrics/metrics-utils.d.ts.map +1 -0
- package/node_modules/@posthog/core/dist/metrics/metrics-utils.js +117 -0
- package/node_modules/@posthog/core/dist/metrics/metrics-utils.mjs +68 -0
- package/node_modules/@posthog/core/dist/metrics/types.d.ts +69 -0
- package/node_modules/@posthog/core/dist/metrics/types.d.ts.map +1 -0
- package/node_modules/@posthog/core/dist/metrics/types.js +18 -0
- package/node_modules/@posthog/core/dist/metrics/types.mjs +0 -0
- package/node_modules/@posthog/core/dist/posthog-core-stateless.d.ts +2 -0
- package/node_modules/@posthog/core/dist/posthog-core-stateless.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/posthog-core-stateless.js +16 -1
- package/node_modules/@posthog/core/dist/posthog-core-stateless.mjs +16 -1
- package/node_modules/@posthog/core/package.json +2 -2
- package/node_modules/@posthog/core/src/index.ts +20 -0
- package/node_modules/@posthog/core/src/metrics/index.spec.ts +459 -0
- package/node_modules/@posthog/core/src/metrics/index.ts +414 -0
- package/node_modules/@posthog/core/src/metrics/metrics-utils.ts +100 -0
- package/node_modules/@posthog/core/src/metrics/types.ts +89 -0
- package/node_modules/@posthog/core/src/posthog-core-stateless.ts +26 -0
- package/node_modules/@posthog/types/dist/capture-metric.d.ts +122 -0
- package/node_modules/@posthog/types/dist/capture-metric.d.ts.map +1 -0
- package/node_modules/@posthog/types/dist/capture-metric.js +36 -0
- package/node_modules/@posthog/types/dist/capture-metric.mjs +2 -0
- package/node_modules/@posthog/types/dist/index.d.ts +3 -1
- package/node_modules/@posthog/types/dist/index.d.ts.map +1 -1
- package/node_modules/@posthog/types/dist/index.js +19 -1
- package/node_modules/@posthog/types/dist/index.mjs +2 -0
- package/node_modules/@posthog/types/dist/posthog-config.d.ts +60 -0
- package/node_modules/@posthog/types/dist/posthog-config.d.ts.map +1 -1
- package/node_modules/@posthog/types/package.json +1 -1
- package/node_modules/@posthog/types/src/capture-metric.ts +133 -0
- package/node_modules/@posthog/types/src/index.ts +17 -0
- package/node_modules/@posthog/types/src/posthog-config.ts +62 -0
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-FAOWNDMK.js → chunk-IC7XGD5C.js} +93 -93
- package/node_modules/@zuplo/runtime/out/esm/chunk-IC7XGD5C.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +830 -6
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/package.json +6 -6
- package/node_modules/@zuplo/runtime/out/esm/chunk-FAOWNDMK.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-FAOWNDMK.js.LEGAL.txt → chunk-IC7XGD5C.js.LEGAL.txt} +0 -0
package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/util.test.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const test = require('tape')
|
|
4
|
+
const {
|
|
5
|
+
stringArrayToHexStripped,
|
|
6
|
+
removeDotSegments
|
|
7
|
+
} = require('../lib/utils')
|
|
8
|
+
|
|
9
|
+
test('stringArrayToHexStripped', (t) => {
|
|
10
|
+
const testCases = [
|
|
11
|
+
[['0', '0', '0', '0'], ''],
|
|
12
|
+
[['0', '0', '0', '1'], '1'],
|
|
13
|
+
[['0', '0', '1', '0'], '10'],
|
|
14
|
+
[['0', '1', '0', '0'], '100'],
|
|
15
|
+
[['1', '0', '0', '0'], '1000'],
|
|
16
|
+
[['1', '0', '0', '1'], '1001'],
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
t.plan(testCases.length)
|
|
20
|
+
|
|
21
|
+
testCases.forEach(([input, expected]) => {
|
|
22
|
+
t.same(stringArrayToHexStripped(input), expected)
|
|
23
|
+
})
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
// Just fixtures, because this function already tested by resolve
|
|
27
|
+
test('removeDotSegments', (t) => {
|
|
28
|
+
const testCases = []
|
|
29
|
+
// https://github.com/fastify/fast-uri/issues/139
|
|
30
|
+
testCases.push(['WS:/WS://1305G130505:1&%0D:1&C(XXXXX*)))))))XXX130505:UUVUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa$aaaaaaaaaaaa13a',
|
|
31
|
+
'WS:/WS://1305G130505:1&%0D:1&C(XXXXX*)))))))XXX130505:UUVUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa$aaaaaaaaaaaa13a'])
|
|
32
|
+
// trailing empty segments must be preserved: RFC 3986 5.2.4 only removes
|
|
33
|
+
// complete "." / ".." segments, never an empty segment
|
|
34
|
+
testCases.push(['//', '//'])
|
|
35
|
+
testCases.push(['/foo//', '/foo//'])
|
|
36
|
+
testCases.push(['/a/b//', '/a/b//'])
|
|
37
|
+
testCases.push(['/x//y//z', '/x//y//z'])
|
|
38
|
+
// "." / ".." segments still collapse
|
|
39
|
+
testCases.push(['/a/b/c/./../../g', '/a/g'])
|
|
40
|
+
testCases.push(['/.', '/'])
|
|
41
|
+
|
|
42
|
+
t.plan(testCases.length)
|
|
43
|
+
|
|
44
|
+
testCases.forEach(([input, expected]) => {
|
|
45
|
+
t.same(removeDotSegments(input), expected)
|
|
46
|
+
})
|
|
47
|
+
})
|
package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/types/index.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
type FastUri = typeof fastUri
|
|
2
|
+
|
|
3
|
+
declare namespace fastUri {
|
|
4
|
+
export interface URIComponent {
|
|
5
|
+
scheme?: string;
|
|
6
|
+
userinfo?: string;
|
|
7
|
+
host?: string;
|
|
8
|
+
port?: number | string;
|
|
9
|
+
path?: string;
|
|
10
|
+
query?: string;
|
|
11
|
+
fragment?: string;
|
|
12
|
+
reference?: string;
|
|
13
|
+
nid?: string;
|
|
14
|
+
nss?: string;
|
|
15
|
+
resourceName?: string;
|
|
16
|
+
secure?: boolean;
|
|
17
|
+
uuid?: string;
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface Options {
|
|
21
|
+
scheme?: string;
|
|
22
|
+
reference?: string;
|
|
23
|
+
unicodeSupport?: boolean;
|
|
24
|
+
domainHost?: boolean;
|
|
25
|
+
absolutePath?: boolean;
|
|
26
|
+
tolerant?: boolean;
|
|
27
|
+
skipEscape?: boolean;
|
|
28
|
+
nid?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function normalize (uri: string, opts?: Options): string
|
|
32
|
+
export function normalize (uri: URIComponent, opts?: Options): URIComponent
|
|
33
|
+
export function normalize (uri: any, opts?: Options): any
|
|
34
|
+
|
|
35
|
+
export function resolve (baseURI: string, relativeURI: string, options?: Options): string
|
|
36
|
+
|
|
37
|
+
export function resolveComponent (base: URIComponent, relative: URIComponent, options?: Options, skipNormalization?: boolean): URIComponent
|
|
38
|
+
|
|
39
|
+
export function parse (uri: string, opts?: Options): URIComponent
|
|
40
|
+
|
|
41
|
+
export function serialize (component: URIComponent, opts?: Options): string
|
|
42
|
+
|
|
43
|
+
export function equal (uriA: string, uriB: string): boolean
|
|
44
|
+
|
|
45
|
+
export function resolve (base: string, path: string): string
|
|
46
|
+
|
|
47
|
+
export const fastUri: FastUri
|
|
48
|
+
export { fastUri as default }
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export = fastUri
|
package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/types/index.tst.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import uri, {
|
|
2
|
+
type URIComponent,
|
|
3
|
+
} from '..'
|
|
4
|
+
import { expect } from 'tstyche'
|
|
5
|
+
|
|
6
|
+
const parsed = uri.parse('foo')
|
|
7
|
+
expect(parsed).type.toBe<URIComponent>()
|
|
8
|
+
|
|
9
|
+
const parsed2 = uri.parse('foo', {
|
|
10
|
+
domainHost: true,
|
|
11
|
+
scheme: 'https',
|
|
12
|
+
unicodeSupport: false
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
expect(parsed2).type.toBe<URIComponent>()
|
|
@@ -6,6 +6,9 @@ export { buildOtlpLogRecord, buildOtlpLogsPayload, buildResourceAttributes, getO
|
|
|
6
6
|
export { PostHogLogs } from './logs';
|
|
7
7
|
export type { BeforeSendLogFn, BufferedLogEntry, CaptureLogger, LogSdkContext, PostHogLogsConfig, ResolvedPostHogLogsConfig, } from './logs/types';
|
|
8
8
|
export type { CaptureLogOptions, LogAttributeValue, LogAttributes, LogSeverityLevel } from './logs/types';
|
|
9
|
+
export { PostHogMetrics, buildOtlpMetricsPayload, buildMetricsResourceAttributes, DEFAULT_HISTOGRAM_BOUNDS, } from './metrics';
|
|
10
|
+
export type { MetricsHost, PostHogMetricsConfig, ResolvedPostHogMetricsConfig, SendMetricsBatchOutcome, } from './metrics';
|
|
11
|
+
export type { CaptureMetricOptions, MetricAttributes, MetricAttributeValue, MetricSample, MetricType, } from './metrics/types';
|
|
9
12
|
export { uuidv7 } from './vendor/uuidv7';
|
|
10
13
|
export * from './cookie';
|
|
11
14
|
export * from './posthog-core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,GACrB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,YAAY,EACZ,UAAU,EACV,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,QAAQ,CAAA;AACf,cAAc,SAAS,CAAA;AACvB,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAA;AACjD,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,kBAAkB,GACnB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,cAAc,CAAA;AAIrB,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACzG,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,GACrB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,YAAY,EACZ,UAAU,EACV,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,QAAQ,CAAA;AACf,cAAc,SAAS,CAAA;AACvB,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAA;AACjD,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,kBAAkB,GACnB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,cAAc,CAAA;AAIrB,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACzG,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,8BAA8B,EAC9B,wBAAwB,GACzB,MAAM,WAAW,CAAA;AAClB,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,WAAW,CAAA;AAElB,YAAY,EACV,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,YAAY,EACZ,UAAU,GACX,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA"}
|
|
@@ -18,6 +18,9 @@ var __webpack_modules__ = {
|
|
|
18
18
|
"./logs/logs-utils": function(module) {
|
|
19
19
|
module.exports = require("./logs/logs-utils.js");
|
|
20
20
|
},
|
|
21
|
+
"./metrics": function(module) {
|
|
22
|
+
module.exports = require("./metrics/index.js");
|
|
23
|
+
},
|
|
21
24
|
"./posthog-core-stateless": function(module) {
|
|
22
25
|
module.exports = require("./posthog-core-stateless.js");
|
|
23
26
|
},
|
|
@@ -84,19 +87,23 @@ var __webpack_exports__ = {};
|
|
|
84
87
|
(()=>{
|
|
85
88
|
__webpack_require__.r(__webpack_exports__);
|
|
86
89
|
__webpack_require__.d(__webpack_exports__, {
|
|
90
|
+
DEFAULT_HISTOGRAM_BOUNDS: ()=>_metrics__WEBPACK_IMPORTED_MODULE_6__.DEFAULT_HISTOGRAM_BOUNDS,
|
|
87
91
|
ErrorTracking: ()=>_error_tracking__WEBPACK_IMPORTED_MODULE_3__,
|
|
88
92
|
PostHogLogs: ()=>_logs__WEBPACK_IMPORTED_MODULE_5__.PostHogLogs,
|
|
93
|
+
PostHogMetrics: ()=>_metrics__WEBPACK_IMPORTED_MODULE_6__.PostHogMetrics,
|
|
94
|
+
buildMetricsResourceAttributes: ()=>_metrics__WEBPACK_IMPORTED_MODULE_6__.buildMetricsResourceAttributes,
|
|
89
95
|
buildOtlpLogRecord: ()=>_logs_logs_utils__WEBPACK_IMPORTED_MODULE_4__.buildOtlpLogRecord,
|
|
90
96
|
buildOtlpLogsPayload: ()=>_logs_logs_utils__WEBPACK_IMPORTED_MODULE_4__.buildOtlpLogsPayload,
|
|
97
|
+
buildOtlpMetricsPayload: ()=>_metrics__WEBPACK_IMPORTED_MODULE_6__.buildOtlpMetricsPayload,
|
|
91
98
|
buildResourceAttributes: ()=>_logs_logs_utils__WEBPACK_IMPORTED_MODULE_4__.buildResourceAttributes,
|
|
92
99
|
flagDetailsToResults: ()=>_featureFlagUtils__WEBPACK_IMPORTED_MODULE_0__.flagDetailsToResults,
|
|
93
100
|
getEnabledFromValue: ()=>_featureFlagUtils__WEBPACK_IMPORTED_MODULE_0__.getEnabledFromValue,
|
|
94
101
|
getFeatureFlagValue: ()=>_featureFlagUtils__WEBPACK_IMPORTED_MODULE_0__.getFeatureFlagValue,
|
|
95
|
-
getLengthFromRules: ()=>
|
|
102
|
+
getLengthFromRules: ()=>_surveys_validation__WEBPACK_IMPORTED_MODULE_13__.getLengthFromRules,
|
|
96
103
|
getOtlpSeverityNumber: ()=>_logs_logs_utils__WEBPACK_IMPORTED_MODULE_4__.getOtlpSeverityNumber,
|
|
97
104
|
getOtlpSeverityText: ()=>_logs_logs_utils__WEBPACK_IMPORTED_MODULE_4__.getOtlpSeverityText,
|
|
98
|
-
getRequirementsHint: ()=>
|
|
99
|
-
getValidationError: ()=>
|
|
105
|
+
getRequirementsHint: ()=>_surveys_validation__WEBPACK_IMPORTED_MODULE_13__.getRequirementsHint,
|
|
106
|
+
getValidationError: ()=>_surveys_validation__WEBPACK_IMPORTED_MODULE_13__.getValidationError,
|
|
100
107
|
getVariantFromValue: ()=>_featureFlagUtils__WEBPACK_IMPORTED_MODULE_0__.getVariantFromValue,
|
|
101
108
|
gzipCompress: ()=>_gzip__WEBPACK_IMPORTED_MODULE_1__.gzipCompress,
|
|
102
109
|
isGzipData: ()=>_gzip__WEBPACK_IMPORTED_MODULE_1__.isGzipData,
|
|
@@ -107,38 +114,42 @@ var __webpack_exports__ = {};
|
|
|
107
114
|
parsePayload: ()=>_featureFlagUtils__WEBPACK_IMPORTED_MODULE_0__.parsePayload,
|
|
108
115
|
toOtlpAnyValue: ()=>_logs_logs_utils__WEBPACK_IMPORTED_MODULE_4__.toOtlpAnyValue,
|
|
109
116
|
toOtlpKeyValueList: ()=>_logs_logs_utils__WEBPACK_IMPORTED_MODULE_4__.toOtlpKeyValueList,
|
|
110
|
-
uuidv7: ()=>
|
|
117
|
+
uuidv7: ()=>_vendor_uuidv7__WEBPACK_IMPORTED_MODULE_7__.uuidv7
|
|
111
118
|
});
|
|
112
119
|
var _featureFlagUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./featureFlagUtils");
|
|
113
120
|
var _gzip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./gzip");
|
|
114
121
|
var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./utils?637c");
|
|
115
122
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
116
123
|
for(var __WEBPACK_IMPORT_KEY__ in _utils__WEBPACK_IMPORTED_MODULE_2__)if ([
|
|
117
|
-
"toOtlpAnyValue",
|
|
118
|
-
"toOtlpKeyValueList",
|
|
119
|
-
"getLengthFromRules",
|
|
120
|
-
"PostHogLogs",
|
|
121
124
|
"isNativeAsyncGzipError",
|
|
122
125
|
"getOtlpSeverityText",
|
|
126
|
+
"PostHogMetrics",
|
|
123
127
|
"getEnabledFromValue",
|
|
124
128
|
"isNativeAsyncGzipReadError",
|
|
125
|
-
"isGzipRequest",
|
|
126
|
-
"getFeatureFlagValue",
|
|
127
129
|
"getVariantFromValue",
|
|
128
130
|
"gzipCompress",
|
|
129
|
-
"ErrorTracking",
|
|
130
131
|
"uuidv7",
|
|
132
|
+
"ErrorTracking",
|
|
133
|
+
"buildMetricsResourceAttributes",
|
|
134
|
+
"parsePayload",
|
|
135
|
+
"getLengthFromRules",
|
|
136
|
+
"isGzipSupported",
|
|
137
|
+
"buildOtlpLogsPayload",
|
|
138
|
+
"flagDetailsToResults",
|
|
139
|
+
"toOtlpAnyValue",
|
|
140
|
+
"DEFAULT_HISTOGRAM_BOUNDS",
|
|
141
|
+
"PostHogLogs",
|
|
142
|
+
"isGzipRequest",
|
|
143
|
+
"getFeatureFlagValue",
|
|
131
144
|
"getValidationError",
|
|
132
145
|
"default",
|
|
133
146
|
"getRequirementsHint",
|
|
134
147
|
"isGzipData",
|
|
135
|
-
"parsePayload",
|
|
136
|
-
"buildResourceAttributes",
|
|
137
148
|
"getOtlpSeverityNumber",
|
|
138
|
-
"
|
|
139
|
-
"
|
|
149
|
+
"buildResourceAttributes",
|
|
150
|
+
"buildOtlpMetricsPayload",
|
|
140
151
|
"buildOtlpLogRecord",
|
|
141
|
-
"
|
|
152
|
+
"toOtlpKeyValueList"
|
|
142
153
|
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
143
154
|
return _utils__WEBPACK_IMPORTED_MODULE_2__[key];
|
|
144
155
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
@@ -146,173 +157,198 @@ var __webpack_exports__ = {};
|
|
|
146
157
|
var _error_tracking__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./error-tracking");
|
|
147
158
|
var _logs_logs_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./logs/logs-utils");
|
|
148
159
|
var _logs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./logs");
|
|
149
|
-
var
|
|
150
|
-
var
|
|
160
|
+
var _metrics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./metrics");
|
|
161
|
+
var _vendor_uuidv7__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("./vendor/uuidv7");
|
|
162
|
+
var _cookie__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("./cookie");
|
|
151
163
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
152
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
|
153
|
-
"toOtlpAnyValue",
|
|
154
|
-
"toOtlpKeyValueList",
|
|
155
|
-
"getLengthFromRules",
|
|
156
|
-
"PostHogLogs",
|
|
164
|
+
for(var __WEBPACK_IMPORT_KEY__ in _cookie__WEBPACK_IMPORTED_MODULE_8__)if ([
|
|
157
165
|
"isNativeAsyncGzipError",
|
|
158
166
|
"getOtlpSeverityText",
|
|
167
|
+
"PostHogMetrics",
|
|
159
168
|
"getEnabledFromValue",
|
|
160
169
|
"isNativeAsyncGzipReadError",
|
|
161
|
-
"isGzipRequest",
|
|
162
|
-
"getFeatureFlagValue",
|
|
163
170
|
"getVariantFromValue",
|
|
164
171
|
"gzipCompress",
|
|
165
|
-
"ErrorTracking",
|
|
166
172
|
"uuidv7",
|
|
173
|
+
"ErrorTracking",
|
|
174
|
+
"buildMetricsResourceAttributes",
|
|
175
|
+
"parsePayload",
|
|
176
|
+
"getLengthFromRules",
|
|
177
|
+
"isGzipSupported",
|
|
178
|
+
"buildOtlpLogsPayload",
|
|
179
|
+
"flagDetailsToResults",
|
|
180
|
+
"toOtlpAnyValue",
|
|
181
|
+
"DEFAULT_HISTOGRAM_BOUNDS",
|
|
182
|
+
"PostHogLogs",
|
|
183
|
+
"isGzipRequest",
|
|
184
|
+
"getFeatureFlagValue",
|
|
167
185
|
"getValidationError",
|
|
168
186
|
"default",
|
|
169
187
|
"getRequirementsHint",
|
|
170
188
|
"isGzipData",
|
|
171
|
-
"parsePayload",
|
|
172
|
-
"buildResourceAttributes",
|
|
173
189
|
"getOtlpSeverityNumber",
|
|
174
|
-
"
|
|
175
|
-
"
|
|
190
|
+
"buildResourceAttributes",
|
|
191
|
+
"buildOtlpMetricsPayload",
|
|
176
192
|
"buildOtlpLogRecord",
|
|
177
|
-
"
|
|
193
|
+
"toOtlpKeyValueList"
|
|
178
194
|
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
179
|
-
return
|
|
195
|
+
return _cookie__WEBPACK_IMPORTED_MODULE_8__[key];
|
|
180
196
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
181
197
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
182
|
-
var
|
|
198
|
+
var _posthog_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("./posthog-core");
|
|
183
199
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
184
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
|
185
|
-
"toOtlpAnyValue",
|
|
186
|
-
"toOtlpKeyValueList",
|
|
187
|
-
"getLengthFromRules",
|
|
188
|
-
"PostHogLogs",
|
|
200
|
+
for(var __WEBPACK_IMPORT_KEY__ in _posthog_core__WEBPACK_IMPORTED_MODULE_9__)if ([
|
|
189
201
|
"isNativeAsyncGzipError",
|
|
190
202
|
"getOtlpSeverityText",
|
|
203
|
+
"PostHogMetrics",
|
|
191
204
|
"getEnabledFromValue",
|
|
192
205
|
"isNativeAsyncGzipReadError",
|
|
193
|
-
"isGzipRequest",
|
|
194
|
-
"getFeatureFlagValue",
|
|
195
206
|
"getVariantFromValue",
|
|
196
207
|
"gzipCompress",
|
|
197
|
-
"ErrorTracking",
|
|
198
208
|
"uuidv7",
|
|
209
|
+
"ErrorTracking",
|
|
210
|
+
"buildMetricsResourceAttributes",
|
|
211
|
+
"parsePayload",
|
|
212
|
+
"getLengthFromRules",
|
|
213
|
+
"isGzipSupported",
|
|
214
|
+
"buildOtlpLogsPayload",
|
|
215
|
+
"flagDetailsToResults",
|
|
216
|
+
"toOtlpAnyValue",
|
|
217
|
+
"DEFAULT_HISTOGRAM_BOUNDS",
|
|
218
|
+
"PostHogLogs",
|
|
219
|
+
"isGzipRequest",
|
|
220
|
+
"getFeatureFlagValue",
|
|
199
221
|
"getValidationError",
|
|
200
222
|
"default",
|
|
201
223
|
"getRequirementsHint",
|
|
202
224
|
"isGzipData",
|
|
203
|
-
"parsePayload",
|
|
204
|
-
"buildResourceAttributes",
|
|
205
225
|
"getOtlpSeverityNumber",
|
|
206
|
-
"
|
|
207
|
-
"
|
|
226
|
+
"buildResourceAttributes",
|
|
227
|
+
"buildOtlpMetricsPayload",
|
|
208
228
|
"buildOtlpLogRecord",
|
|
209
|
-
"
|
|
229
|
+
"toOtlpKeyValueList"
|
|
210
230
|
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
211
|
-
return
|
|
231
|
+
return _posthog_core__WEBPACK_IMPORTED_MODULE_9__[key];
|
|
212
232
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
213
233
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
214
|
-
var
|
|
234
|
+
var _posthog_core_stateless__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("./posthog-core-stateless");
|
|
215
235
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
216
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
|
217
|
-
"toOtlpAnyValue",
|
|
218
|
-
"toOtlpKeyValueList",
|
|
219
|
-
"getLengthFromRules",
|
|
220
|
-
"PostHogLogs",
|
|
236
|
+
for(var __WEBPACK_IMPORT_KEY__ in _posthog_core_stateless__WEBPACK_IMPORTED_MODULE_10__)if ([
|
|
221
237
|
"isNativeAsyncGzipError",
|
|
222
238
|
"getOtlpSeverityText",
|
|
239
|
+
"PostHogMetrics",
|
|
223
240
|
"getEnabledFromValue",
|
|
224
241
|
"isNativeAsyncGzipReadError",
|
|
225
|
-
"isGzipRequest",
|
|
226
|
-
"getFeatureFlagValue",
|
|
227
242
|
"getVariantFromValue",
|
|
228
243
|
"gzipCompress",
|
|
229
|
-
"ErrorTracking",
|
|
230
244
|
"uuidv7",
|
|
245
|
+
"ErrorTracking",
|
|
246
|
+
"buildMetricsResourceAttributes",
|
|
247
|
+
"parsePayload",
|
|
248
|
+
"getLengthFromRules",
|
|
249
|
+
"isGzipSupported",
|
|
250
|
+
"buildOtlpLogsPayload",
|
|
251
|
+
"flagDetailsToResults",
|
|
252
|
+
"toOtlpAnyValue",
|
|
253
|
+
"DEFAULT_HISTOGRAM_BOUNDS",
|
|
254
|
+
"PostHogLogs",
|
|
255
|
+
"isGzipRequest",
|
|
256
|
+
"getFeatureFlagValue",
|
|
231
257
|
"getValidationError",
|
|
232
258
|
"default",
|
|
233
259
|
"getRequirementsHint",
|
|
234
260
|
"isGzipData",
|
|
235
|
-
"parsePayload",
|
|
236
|
-
"buildResourceAttributes",
|
|
237
261
|
"getOtlpSeverityNumber",
|
|
238
|
-
"
|
|
239
|
-
"
|
|
262
|
+
"buildResourceAttributes",
|
|
263
|
+
"buildOtlpMetricsPayload",
|
|
240
264
|
"buildOtlpLogRecord",
|
|
241
|
-
"
|
|
265
|
+
"toOtlpKeyValueList"
|
|
242
266
|
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
243
|
-
return
|
|
267
|
+
return _posthog_core_stateless__WEBPACK_IMPORTED_MODULE_10__[key];
|
|
244
268
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
245
269
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
246
|
-
var
|
|
270
|
+
var _tracing_headers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("./tracing-headers");
|
|
247
271
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
248
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
|
249
|
-
"toOtlpAnyValue",
|
|
250
|
-
"toOtlpKeyValueList",
|
|
251
|
-
"getLengthFromRules",
|
|
252
|
-
"PostHogLogs",
|
|
272
|
+
for(var __WEBPACK_IMPORT_KEY__ in _tracing_headers__WEBPACK_IMPORTED_MODULE_11__)if ([
|
|
253
273
|
"isNativeAsyncGzipError",
|
|
254
274
|
"getOtlpSeverityText",
|
|
275
|
+
"PostHogMetrics",
|
|
255
276
|
"getEnabledFromValue",
|
|
256
277
|
"isNativeAsyncGzipReadError",
|
|
257
|
-
"isGzipRequest",
|
|
258
|
-
"getFeatureFlagValue",
|
|
259
278
|
"getVariantFromValue",
|
|
260
279
|
"gzipCompress",
|
|
261
|
-
"ErrorTracking",
|
|
262
280
|
"uuidv7",
|
|
281
|
+
"ErrorTracking",
|
|
282
|
+
"buildMetricsResourceAttributes",
|
|
283
|
+
"parsePayload",
|
|
284
|
+
"getLengthFromRules",
|
|
285
|
+
"isGzipSupported",
|
|
286
|
+
"buildOtlpLogsPayload",
|
|
287
|
+
"flagDetailsToResults",
|
|
288
|
+
"toOtlpAnyValue",
|
|
289
|
+
"DEFAULT_HISTOGRAM_BOUNDS",
|
|
290
|
+
"PostHogLogs",
|
|
291
|
+
"isGzipRequest",
|
|
292
|
+
"getFeatureFlagValue",
|
|
263
293
|
"getValidationError",
|
|
264
294
|
"default",
|
|
265
295
|
"getRequirementsHint",
|
|
266
296
|
"isGzipData",
|
|
267
|
-
"parsePayload",
|
|
268
|
-
"buildResourceAttributes",
|
|
269
297
|
"getOtlpSeverityNumber",
|
|
270
|
-
"
|
|
271
|
-
"
|
|
298
|
+
"buildResourceAttributes",
|
|
299
|
+
"buildOtlpMetricsPayload",
|
|
272
300
|
"buildOtlpLogRecord",
|
|
273
|
-
"
|
|
301
|
+
"toOtlpKeyValueList"
|
|
274
302
|
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
275
|
-
return
|
|
303
|
+
return _tracing_headers__WEBPACK_IMPORTED_MODULE_11__[key];
|
|
276
304
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
277
305
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
278
|
-
var
|
|
306
|
+
var _types__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("./types");
|
|
279
307
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
280
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
|
281
|
-
"toOtlpAnyValue",
|
|
282
|
-
"toOtlpKeyValueList",
|
|
283
|
-
"getLengthFromRules",
|
|
284
|
-
"PostHogLogs",
|
|
308
|
+
for(var __WEBPACK_IMPORT_KEY__ in _types__WEBPACK_IMPORTED_MODULE_12__)if ([
|
|
285
309
|
"isNativeAsyncGzipError",
|
|
286
310
|
"getOtlpSeverityText",
|
|
311
|
+
"PostHogMetrics",
|
|
287
312
|
"getEnabledFromValue",
|
|
288
313
|
"isNativeAsyncGzipReadError",
|
|
289
|
-
"isGzipRequest",
|
|
290
|
-
"getFeatureFlagValue",
|
|
291
314
|
"getVariantFromValue",
|
|
292
315
|
"gzipCompress",
|
|
293
|
-
"ErrorTracking",
|
|
294
316
|
"uuidv7",
|
|
317
|
+
"ErrorTracking",
|
|
318
|
+
"buildMetricsResourceAttributes",
|
|
319
|
+
"parsePayload",
|
|
320
|
+
"getLengthFromRules",
|
|
321
|
+
"isGzipSupported",
|
|
322
|
+
"buildOtlpLogsPayload",
|
|
323
|
+
"flagDetailsToResults",
|
|
324
|
+
"toOtlpAnyValue",
|
|
325
|
+
"DEFAULT_HISTOGRAM_BOUNDS",
|
|
326
|
+
"PostHogLogs",
|
|
327
|
+
"isGzipRequest",
|
|
328
|
+
"getFeatureFlagValue",
|
|
295
329
|
"getValidationError",
|
|
296
330
|
"default",
|
|
297
331
|
"getRequirementsHint",
|
|
298
332
|
"isGzipData",
|
|
299
|
-
"parsePayload",
|
|
300
|
-
"buildResourceAttributes",
|
|
301
333
|
"getOtlpSeverityNumber",
|
|
302
|
-
"
|
|
303
|
-
"
|
|
334
|
+
"buildResourceAttributes",
|
|
335
|
+
"buildOtlpMetricsPayload",
|
|
304
336
|
"buildOtlpLogRecord",
|
|
305
|
-
"
|
|
337
|
+
"toOtlpKeyValueList"
|
|
306
338
|
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
307
|
-
return
|
|
339
|
+
return _types__WEBPACK_IMPORTED_MODULE_12__[key];
|
|
308
340
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
309
341
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
310
|
-
var
|
|
342
|
+
var _surveys_validation__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("./surveys/validation");
|
|
311
343
|
})();
|
|
344
|
+
exports.DEFAULT_HISTOGRAM_BOUNDS = __webpack_exports__.DEFAULT_HISTOGRAM_BOUNDS;
|
|
312
345
|
exports.ErrorTracking = __webpack_exports__.ErrorTracking;
|
|
313
346
|
exports.PostHogLogs = __webpack_exports__.PostHogLogs;
|
|
347
|
+
exports.PostHogMetrics = __webpack_exports__.PostHogMetrics;
|
|
348
|
+
exports.buildMetricsResourceAttributes = __webpack_exports__.buildMetricsResourceAttributes;
|
|
314
349
|
exports.buildOtlpLogRecord = __webpack_exports__.buildOtlpLogRecord;
|
|
315
350
|
exports.buildOtlpLogsPayload = __webpack_exports__.buildOtlpLogsPayload;
|
|
351
|
+
exports.buildOtlpMetricsPayload = __webpack_exports__.buildOtlpMetricsPayload;
|
|
316
352
|
exports.buildResourceAttributes = __webpack_exports__.buildResourceAttributes;
|
|
317
353
|
exports.flagDetailsToResults = __webpack_exports__.flagDetailsToResults;
|
|
318
354
|
exports.getEnabledFromValue = __webpack_exports__.getEnabledFromValue;
|
|
@@ -334,10 +370,14 @@ exports.toOtlpAnyValue = __webpack_exports__.toOtlpAnyValue;
|
|
|
334
370
|
exports.toOtlpKeyValueList = __webpack_exports__.toOtlpKeyValueList;
|
|
335
371
|
exports.uuidv7 = __webpack_exports__.uuidv7;
|
|
336
372
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
373
|
+
"DEFAULT_HISTOGRAM_BOUNDS",
|
|
337
374
|
"ErrorTracking",
|
|
338
375
|
"PostHogLogs",
|
|
376
|
+
"PostHogMetrics",
|
|
377
|
+
"buildMetricsResourceAttributes",
|
|
339
378
|
"buildOtlpLogRecord",
|
|
340
379
|
"buildOtlpLogsPayload",
|
|
380
|
+
"buildOtlpMetricsPayload",
|
|
341
381
|
"buildResourceAttributes",
|
|
342
382
|
"flagDetailsToResults",
|
|
343
383
|
"getEnabledFromValue",
|
|
@@ -2,6 +2,7 @@ import { flagDetailsToResults, getEnabledFromValue, getFeatureFlagValue, getVari
|
|
|
2
2
|
import { gzipCompress, isGzipData, isGzipRequest, isGzipSupported, isNativeAsyncGzipError, isNativeAsyncGzipReadError } from "./gzip.mjs";
|
|
3
3
|
import { buildOtlpLogRecord, buildOtlpLogsPayload, buildResourceAttributes, getOtlpSeverityNumber, getOtlpSeverityText, toOtlpAnyValue, toOtlpKeyValueList } from "./logs/logs-utils.mjs";
|
|
4
4
|
import { PostHogLogs } from "./logs/index.mjs";
|
|
5
|
+
import { DEFAULT_HISTOGRAM_BOUNDS, PostHogMetrics, buildMetricsResourceAttributes, buildOtlpMetricsPayload } from "./metrics/index.mjs";
|
|
5
6
|
import { uuidv7 } from "./vendor/uuidv7.mjs";
|
|
6
7
|
import { getLengthFromRules, getRequirementsHint, getValidationError } from "./surveys/validation.mjs";
|
|
7
8
|
export * from "./utils/index.mjs";
|
|
@@ -11,4 +12,4 @@ export * from "./posthog-core-stateless.mjs";
|
|
|
11
12
|
export * from "./tracing-headers.mjs";
|
|
12
13
|
export * from "./types.mjs";
|
|
13
14
|
import * as __WEBPACK_EXTERNAL_MODULE__error_tracking_index_mjs_b3406d6f__ from "./error-tracking/index.mjs";
|
|
14
|
-
export { __WEBPACK_EXTERNAL_MODULE__error_tracking_index_mjs_b3406d6f__ as ErrorTracking, PostHogLogs, buildOtlpLogRecord, buildOtlpLogsPayload, buildResourceAttributes, flagDetailsToResults, getEnabledFromValue, getFeatureFlagValue, getLengthFromRules, getOtlpSeverityNumber, getOtlpSeverityText, getRequirementsHint, getValidationError, getVariantFromValue, gzipCompress, isGzipData, isGzipRequest, isGzipSupported, isNativeAsyncGzipError, isNativeAsyncGzipReadError, parsePayload, toOtlpAnyValue, toOtlpKeyValueList, uuidv7 };
|
|
15
|
+
export { DEFAULT_HISTOGRAM_BOUNDS, __WEBPACK_EXTERNAL_MODULE__error_tracking_index_mjs_b3406d6f__ as ErrorTracking, PostHogLogs, PostHogMetrics, buildMetricsResourceAttributes, buildOtlpLogRecord, buildOtlpLogsPayload, buildOtlpMetricsPayload, buildResourceAttributes, flagDetailsToResults, getEnabledFromValue, getFeatureFlagValue, getLengthFromRules, getOtlpSeverityNumber, getOtlpSeverityText, getRequirementsHint, getValidationError, getVariantFromValue, gzipCompress, isGzipData, isGzipRequest, isGzipSupported, isNativeAsyncGzipError, isNativeAsyncGzipReadError, parsePayload, toOtlpAnyValue, toOtlpKeyValueList, uuidv7 };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { CaptureMetricOptions, OtlpMetricsPayload } from '@posthog/types';
|
|
2
|
+
import type { Logger } from '../types';
|
|
3
|
+
import type { MetricsHost, ResolvedPostHogMetricsConfig } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Statsd-style pre-aggregating metrics client.
|
|
6
|
+
*
|
|
7
|
+
* Samples are folded into per-series aggregates in memory (counts sum,
|
|
8
|
+
* gauges keep the last value, histograms accumulate buckets) and flushed as
|
|
9
|
+
* one OTLP data point per series per window — a burst of 10k `count()` calls
|
|
10
|
+
* costs one data point on the wire. Sums and histograms use delta
|
|
11
|
+
* temporality, so each data point stands alone and client restarts need no
|
|
12
|
+
* cross-window state.
|
|
13
|
+
*
|
|
14
|
+
* Deliberately unlike logs, no per-user context (distinct ID, session ID) is
|
|
15
|
+
* attached: every attribute value creates a new series, and per-user series
|
|
16
|
+
* are the canonical metrics-cardinality explosion.
|
|
17
|
+
*/
|
|
18
|
+
export declare class PostHogMetrics {
|
|
19
|
+
private readonly _instance;
|
|
20
|
+
private readonly _config;
|
|
21
|
+
private readonly _logger;
|
|
22
|
+
private _series;
|
|
23
|
+
private _flushTimer?;
|
|
24
|
+
private _flushPromise;
|
|
25
|
+
private _seriesCapWarned;
|
|
26
|
+
private _typeByName;
|
|
27
|
+
private _typeCollisionWarned;
|
|
28
|
+
constructor(_instance: MetricsHost, _config: ResolvedPostHogMetricsConfig, _logger: Logger);
|
|
29
|
+
count(name: string, value?: number, options?: CaptureMetricOptions): void;
|
|
30
|
+
gauge(name: string, value: number, options?: CaptureMetricOptions): void;
|
|
31
|
+
histogram(name: string, value: number, options?: CaptureMetricOptions): void;
|
|
32
|
+
/** Sends everything aggregated so far without waiting for the flush interval. */
|
|
33
|
+
flush(): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Synchronously snapshots the current window into an OTLP payload and
|
|
36
|
+
* resets it, bypassing the flush serializer entirely — for unload-time
|
|
37
|
+
* drains where the host must hand the payload to a synchronous transport
|
|
38
|
+
* (sendBeacon) in the same tick. Returns `null` when there is nothing to
|
|
39
|
+
* send. The caller owns delivery; there is no retry for a drained window.
|
|
40
|
+
*/
|
|
41
|
+
drainWindow(): OtlpMetricsPayload | null;
|
|
42
|
+
/** Clears the flush timer and drops the current window. */
|
|
43
|
+
reset(): void;
|
|
44
|
+
private _capture;
|
|
45
|
+
private _fold;
|
|
46
|
+
private _runBeforeSend;
|
|
47
|
+
private _armFlushTimer;
|
|
48
|
+
private _clearFlushTimer;
|
|
49
|
+
private _doFlush;
|
|
50
|
+
private _buildPayload;
|
|
51
|
+
/**
|
|
52
|
+
* Groups the window's series into OTLP metric entries — one entry per
|
|
53
|
+
* (type, name, unit), one data point per attribute combination.
|
|
54
|
+
*/
|
|
55
|
+
private _buildMetrics;
|
|
56
|
+
/** Folds an unsent window back into the live one after a transient send failure. */
|
|
57
|
+
private _mergeWindowBack;
|
|
58
|
+
}
|
|
59
|
+
export { buildOtlpMetricsPayload, buildMetricsResourceAttributes, DEFAULT_HISTOGRAM_BOUNDS } from './metrics-utils';
|
|
60
|
+
export type { MetricsHost, PostHogMetricsConfig, ResolvedPostHogMetricsConfig, SendMetricsBatchOutcome } from './types';
|
|
61
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/metrics/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAMpB,kBAAkB,EAEnB,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAWtC,OAAO,KAAK,EAAE,WAAW,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AA2BxE;;;;;;;;;;;;;GAaG;AACH,qBAAa,cAAc;IAevB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAhB1B,OAAO,CAAC,OAAO,CAAiC;IAChD,OAAO,CAAC,WAAW,CAAC,CAAmC;IAGvD,OAAO,CAAC,aAAa,CAA6B;IAElD,OAAO,CAAC,gBAAgB,CAAQ;IAIhC,OAAO,CAAC,WAAW,CAAgC;IACnD,OAAO,CAAC,oBAAoB,CAAoB;gBAG7B,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,4BAA4B,EACrC,OAAO,EAAE,MAAM;IAGlC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,MAAU,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI;IAI5E,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI;IAIxE,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI;IAI5E,iFAAiF;IACjF,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAiBtB;;;;;;OAMG;IACH,WAAW,IAAI,kBAAkB,GAAG,IAAI;IAYxC,2DAA2D;IAC3D,KAAK,IAAI,IAAI;IASb,OAAO,CAAC,QAAQ;IAgEhB,OAAO,CAAC,KAAK;IA6Bb,OAAO,CAAC,cAAc;IAuBtB,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,gBAAgB;YAOV,QAAQ;IAiCtB,OAAO,CAAC,aAAa;IASrB;;;OAGG;IACH,OAAO,CAAC,aAAa;IAwDrB,oFAAoF;IACpF,OAAO,CAAC,gBAAgB;CAiCzB;AAED,OAAO,EAAE,uBAAuB,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AACnH,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA"}
|