feat(server): OpenTelemetry integration (#7356)
* wip * span class decorator fix typing * improvements * noisy postgres logs formatting * add source * strict string comparison Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> * remove debug code * execution time histogram * remove prometheus stuff remove prometheus data * disable by default disable nestjs-otel stuff by default update imports * re-add postgres instrumentation formatting formatting * refactor: execution time histogram * decorator alias * formatting * keep original method order in filesystem repo * linting * enable otel sdk in e2e * actually enable otel sdk in e2e * share exclude paths * formatting * fix rebase * more buckets * add example setup * add envs fix actual fix * linting * update comments * update docker env * use more specific env --------- Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
@@ -39,6 +39,7 @@ import {
|
||||
import { AssetEntity, AssetJobStatusEntity, AssetType, ExifEntity, SmartInfoEntity } from '../entities';
|
||||
import { DummyValue, GenerateSql } from '../infra.util';
|
||||
import { Chunked, ChunkedArray, OptionalBetween, paginate, paginatedBuilder, searchAssetBuilder } from '../infra.utils';
|
||||
import { Instrumentation } from '../instrumentation';
|
||||
|
||||
const truncateMap: Record<TimeBucketSize, string> = {
|
||||
[TimeBucketSize.DAY]: 'day',
|
||||
@@ -50,6 +51,7 @@ const dateTrunc = (options: TimeBucketOptions) =>
|
||||
truncateMap[options.size]
|
||||
}', (asset."localDateTime" at time zone 'UTC')) at time zone 'UTC')::timestamptz`;
|
||||
|
||||
@Instrumentation()
|
||||
@Injectable()
|
||||
export class AssetRepository implements IAssetRepository {
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user