mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Migrate eslint to v9
This commit is contained in:
parent
bad8ea2c2e
commit
034e1bf328
106 changed files with 2130 additions and 1445 deletions
|
@ -68,8 +68,13 @@ async function registerOpentelemetryTracing () {
|
|||
}, DiagLogLevel.INFO)
|
||||
|
||||
const tracerProvider = new NodeTracerProvider.default.NodeTracerProvider({
|
||||
spanProcessors: [
|
||||
new BatchSpanProcessor.default.BatchSpanProcessor(
|
||||
new JaegerExporter({ endpoint: CONFIG.OPEN_TELEMETRY.TRACING.JAEGER_EXPORTER.ENDPOINT })
|
||||
)
|
||||
],
|
||||
resource: new Resource.default.Resource({
|
||||
[SemanticResourceAttributes.default.SemanticResourceAttributes.SERVICE_NAME]: 'peertube'
|
||||
[SemanticResourceAttributes.default.ATTR_SERVICE_NAME]: 'peertube'
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -92,16 +97,10 @@ async function registerOpentelemetryTracing () {
|
|||
]
|
||||
})
|
||||
|
||||
tracerProvider.addSpanProcessor(
|
||||
new BatchSpanProcessor.default.BatchSpanProcessor(
|
||||
new JaegerExporter({ endpoint: CONFIG.OPEN_TELEMETRY.TRACING.JAEGER_EXPORTER.ENDPOINT })
|
||||
)
|
||||
)
|
||||
|
||||
tracerProvider.register()
|
||||
}
|
||||
|
||||
async function wrapWithSpanAndContext <T> (spanName: string, cb: () => Promise<T>) {
|
||||
async function wrapWithSpanAndContext<T> (spanName: string, cb: () => Promise<T>) {
|
||||
const { context, trace } = await import('@opentelemetry/api')
|
||||
|
||||
if (CONFIG.OPEN_TELEMETRY.TRACING.ENABLED !== true) {
|
||||
|
@ -135,6 +134,5 @@ class TrackerMock {
|
|||
|
||||
class SpanMock {
|
||||
end () {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue