From 541a117c7e765db85fa3e72c1a963dc8ca1a5dad Mon Sep 17 00:00:00 2001 From: Myrotvorets Date: Thu, 26 Aug 2021 01:15:53 +0300 Subject: [PATCH] Fix warnings --- src/controllers/lifecycle.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/lifecycle.ts b/src/controllers/lifecycle.ts index a1362941..31df811d 100644 --- a/src/controllers/lifecycle.ts +++ b/src/controllers/lifecycle.ts @@ -3,7 +3,7 @@ import Bugsnag from '@bugsnag/js'; import debug from 'debug'; import { Knex } from 'knex'; import { Telegraf } from 'telegraf'; -import api, { context, trace } from '@opentelemetry/api'; +import { context, trace } from '@opentelemetry/api'; import { InlineKeyboardMarkup } from 'typegram'; import { addPost, checkPostExists } from '../lib/db'; import { Environment } from '../lib/environment'; @@ -55,7 +55,7 @@ async function sendNewPosts(bot: Telegraf, chat: number, data: PostD export function lifecycle(env: Environment, bot: Telegraf): void { const inner = (): void => { - const tracer = api.trace.getTracer('tracer'); + const tracer = trace.getTracer('tracer'); const span = tracer.startSpan('Get posts'); void context.with(trace.setSpan(context.active(), span), async () => { try {