Compare commits

..

2 Commits

43 changed files with 106 additions and 37 deletions

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.31.7](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.31.6...@standardnotes/analytics@2.31.7) (2023-10-13)
### Bug Fixes
* reduce the amount of metrics gathered in telemetery ([32fe8d0](https://github.com/standardnotes/server/commit/32fe8d0a8523d6e1875cd0814c0cbdf27d8df7b3))
## [2.31.6](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.31.5...@standardnotes/analytics@2.31.6) (2023-10-12)
**Note:** Version bump only for package @standardnotes/analytics

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK, OpenTelemetryTracer } from '@standardnotes/domain-events-infra'
import { EmailLevel, ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.AnalyticsScheduledTask)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.AnalyticsScheduledTask })
sdk.start()
import { Logger } from 'winston'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.AnalyticsWorker)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.AnalyticsWorker })
sdk.start()
import { Logger } from 'winston'

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/analytics",
"version": "2.31.6",
"version": "2.31.7",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.79.12](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.79.11...@standardnotes/api-gateway@1.79.12) (2023-10-13)
### Bug Fixes
* reduce the amount of metrics gathered in telemetery ([32fe8d0](https://github.com/standardnotes/api-gateway/commit/32fe8d0a8523d6e1875cd0814c0cbdf27d8df7b3))
## [1.79.11](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.79.10...@standardnotes/api-gateway@1.79.11) (2023-10-12)
### Bug Fixes

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.ApiGateway)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.ApiGateway })
sdk.start()
import '../src/Controller/LegacyController'

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api-gateway",
"version": "1.79.11",
"version": "1.79.12",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.158.7](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.158.6...@standardnotes/auth-server@1.158.7) (2023-10-13)
### Bug Fixes
* reduce the amount of metrics gathered in telemetery ([32fe8d0](https://github.com/standardnotes/server/commit/32fe8d0a8523d6e1875cd0814c0cbdf27d8df7b3))
## [1.158.6](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.158.5...@standardnotes/auth-server@1.158.6) (2023-10-12)
### Bug Fixes

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK, OpenTelemetryTracer } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.AuthScheduledTask)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.AuthScheduledTask })
sdk.start()
import { Stream } from 'stream'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK, OpenTelemetryTracer } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.AuthScheduledTask)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.AuthScheduledTask })
sdk.start()
import { Logger } from 'winston'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.Auth)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.Auth })
sdk.start()
import '../src/Infra/InversifyExpressUtils/AnnotatedAuthController'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK, OpenTelemetryTracer } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.AuthScheduledTask)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.AuthScheduledTask })
sdk.start()
import { Logger } from 'winston'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK, OpenTelemetryTracer } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier, RoleName, TransitionStatus } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.AuthScheduledTask)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.AuthScheduledTask })
sdk.start()
import { Logger } from 'winston'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK, OpenTelemetryTracer } from '@standardnotes/domain-events-infra'
import { Email, ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.AuthScheduledTask)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.AuthScheduledTask })
sdk.start()
import { Logger } from 'winston'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.AuthWorker)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.AuthWorker })
sdk.start()
import { Logger } from 'winston'

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/auth-server",
"version": "1.158.6",
"version": "1.158.7",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.19.7](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.19.6...@standardnotes/domain-events-infra@1.19.7) (2023-10-13)
### Bug Fixes
* reduce the amount of metrics gathered in telemetery ([32fe8d0](https://github.com/standardnotes/server/commit/32fe8d0a8523d6e1875cd0814c0cbdf27d8df7b3))
## [1.19.6](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.19.5...@standardnotes/domain-events-infra@1.19.6) (2023-10-12)
**Note:** Version bump only for package @standardnotes/domain-events-infra

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-events-infra",
"version": "1.19.6",
"version": "1.19.7",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -18,8 +18,11 @@ export class OpenTelemetrySDK implements OpenTelemetrySDKInterface {
private declare sdk: OpenTelemetrySDKNode.NodeSDK
constructor(
private serviceName: string,
private spanRatio?: number,
private options: {
serviceName: string
spanRatio?: number
metricExportIntervalMillis?: number
},
) {
this.build()
}
@@ -27,24 +30,28 @@ export class OpenTelemetrySDK implements OpenTelemetrySDKInterface {
build(): void {
const otResource = OpenTelemetrySDKNode.resources.Resource.default().merge(
new OpenTelemetrySDKNode.resources.Resource({
[SemanticResourceAttributes.SERVICE_NAME]: this.serviceName,
[SemanticResourceAttributes.SERVICE_NAME]: this.options.serviceName,
}),
)
const traceExporter = new OTLPTraceExporter()
const spanProcessor = new OpenTelemetrySDKNode.tracing.BatchSpanProcessor(traceExporter)
const metricExportIntervalMillis = this.options.metricExportIntervalMillis ?? 300_000
const metricReader = new OpenTelemetrySDKNode.metrics.PeriodicExportingMetricReader({
exportIntervalMillis: 1_000,
exportIntervalMillis: metricExportIntervalMillis,
exporter: new OTLPMetricExporter(),
})
const serviceName = this.serviceName
const serviceName = this.options.serviceName
const winstonInstrumentation = new WinstonInstrumentation({
logHook: (_span, record) => {
record['resource.service.name'] = serviceName
},
})
const ratio = this.spanRatio ?? 0.01
const ratio = this.options.spanRatio ?? 0.01
this.sdk = new OpenTelemetrySDKNode.NodeSDK({
sampler: new OpenTelemetrySDKNode.tracing.TraceIdRatioBasedSampler(ratio),

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.13.12](https://github.com/standardnotes/server/compare/@standardnotes/event-store@1.13.11...@standardnotes/event-store@1.13.12) (2023-10-13)
**Note:** Version bump only for package @standardnotes/event-store
## [1.13.11](https://github.com/standardnotes/server/compare/@standardnotes/event-store@1.13.10...@standardnotes/event-store@1.13.11) (2023-10-12)
**Note:** Version bump only for package @standardnotes/event-store

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/event-store",
"version": "1.13.11",
"version": "1.13.12",
"description": "Event Store Service",
"private": true,
"main": "dist/src/index.js",

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.30.7](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.30.6...@standardnotes/files-server@1.30.7) (2023-10-13)
### Bug Fixes
* reduce the amount of metrics gathered in telemetery ([32fe8d0](https://github.com/standardnotes/files/commit/32fe8d0a8523d6e1875cd0814c0cbdf27d8df7b3))
## [1.30.6](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.30.5...@standardnotes/files-server@1.30.6) (2023-10-12)
**Note:** Version bump only for package @standardnotes/files-server

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.Files)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.Files })
sdk.start()
import * as busboy from 'connect-busboy'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.FilesWorker)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.FilesWorker })
sdk.start()
import { Logger } from 'winston'

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files-server",
"version": "1.30.6",
"version": "1.30.7",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.17.13](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.17.12...@standardnotes/home-server@1.17.13) (2023-10-13)
**Note:** Version bump only for package @standardnotes/home-server
## [1.17.12](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.17.11...@standardnotes/home-server@1.17.12) (2023-10-12)
**Note:** Version bump only for package @standardnotes/home-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/home-server",
"version": "1.17.12",
"version": "1.17.13",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.7](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.45.6...@standardnotes/revisions-server@1.45.7) (2023-10-13)
### Bug Fixes
* reduce the amount of metrics gathered in telemetery ([32fe8d0](https://github.com/standardnotes/server/commit/32fe8d0a8523d6e1875cd0814c0cbdf27d8df7b3))
## [1.45.6](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.45.5...@standardnotes/revisions-server@1.45.6) (2023-10-12)
**Note:** Version bump only for package @standardnotes/revisions-server

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.Revisions)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.Revisions })
sdk.start()
import * as cors from 'cors'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.RevisionsWorker)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.RevisionsWorker })
sdk.start()
import { Logger } from 'winston'

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/revisions-server",
"version": "1.45.6",
"version": "1.45.7",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.25.7](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.25.6...@standardnotes/scheduler-server@1.25.7) (2023-10-13)
### Bug Fixes
* reduce the amount of metrics gathered in telemetery ([32fe8d0](https://github.com/standardnotes/server/commit/32fe8d0a8523d6e1875cd0814c0cbdf27d8df7b3))
## [1.25.6](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.25.5...@standardnotes/scheduler-server@1.25.6) (2023-10-12)
**Note:** Version bump only for package @standardnotes/scheduler-server

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK, OpenTelemetryTracer } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.SchedulerScheduledTask)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.SchedulerScheduledTask })
sdk.start()
import { Logger } from 'winston'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.SchedulerWorker)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.SchedulerWorker })
sdk.start()
import { Logger } from 'winston'

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/scheduler-server",
"version": "1.25.6",
"version": "1.25.7",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.117.7](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.117.6...@standardnotes/syncing-server@1.117.7) (2023-10-13)
### Bug Fixes
* reduce the amount of metrics gathered in telemetery ([32fe8d0](https://github.com/standardnotes/syncing-server-js/commit/32fe8d0a8523d6e1875cd0814c0cbdf27d8df7b3))
## [1.117.6](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.117.5...@standardnotes/syncing-server@1.117.6) (2023-10-12)
### Bug Fixes

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.SyncingServer)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.SyncingServer })
sdk.start()
import '../src/Infra/InversifyExpressUtils/AnnotatedHealthCheckController'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.SyncingServerWorker)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.SyncingServerWorker })
sdk.start()
import { Logger } from 'winston'

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/syncing-server",
"version": "1.117.6",
"version": "1.117.7",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.16.7](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.16.6...@standardnotes/websockets-server@1.16.7) (2023-10-13)
### Bug Fixes
* reduce the amount of metrics gathered in telemetery ([32fe8d0](https://github.com/standardnotes/server/commit/32fe8d0a8523d6e1875cd0814c0cbdf27d8df7b3))
## [1.16.6](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.16.5...@standardnotes/websockets-server@1.16.6) (2023-10-12)
**Note:** Version bump only for package @standardnotes/websockets-server

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.Websockets)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.Websockets })
sdk.start()
import '../src/Infra/InversifyExpressUtils/AnnotatedHealthCheckController'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { OpenTelemetrySDK } from '@standardnotes/domain-events-infra'
import { ServiceIdentifier } from '@standardnotes/domain-core'
const sdk = new OpenTelemetrySDK(ServiceIdentifier.NAMES.WebsocketsWorker)
const sdk = new OpenTelemetrySDK({ serviceName: ServiceIdentifier.NAMES.WebsocketsWorker })
sdk.start()
import { Logger } from 'winston'

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/websockets-server",
"version": "1.16.6",
"version": "1.16.7",
"engines": {
"node": ">=18.0.0 <21.0.0"
},