Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kibertoad committed Apr 24, 2024
1 parent d825646 commit d687ee2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"plugin:@typescript-eslint/strict",
"plugin:vitest/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"prettier"
"plugin:import/typescript"
],
"plugins": ["@typescript-eslint", "vitest", "import"],
"parser": "@typescript-eslint/parser",
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

> 27 February 2024
- * export isZodError function [`#126`](https://github.com/lokalise/fastify-extras/pull/126)
- - export isZodError function [`#126`](https://github.com/lokalise/fastify-extras/pull/126)

#### [v16.4.0](https://github.com/lokalise/fastify-extras/compare/v16.3.1...v16.4.0)

Expand Down Expand Up @@ -153,7 +153,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

> 20 September 2023
- * add FastifyReplyWithPayload type [`#82`](https://github.com/lokalise/fastify-extras/pull/82)
- - add FastifyReplyWithPayload type [`#82`](https://github.com/lokalise/fastify-extras/pull/82)
- Bump @opentelemetry/exporter-trace-otlp-grpc from 0.41.2 to 0.43.0 [`#80`](https://github.com/lokalise/fastify-extras/pull/80)
- Bump newrelic from 11.0.0 to 11.1.0 [`#79`](https://github.com/lokalise/fastify-extras/pull/79)

Expand Down
4 changes: 0 additions & 4 deletions lib/plugins/opentelemetry/spanProcessors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,14 @@ import { REQUEST_ID_STORE_KEY } from '../requestContextProviderPlugin'
*/
export class LokaliseSimpleSpanProcessor extends SimpleSpanProcessor {
onStart(span: Span) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const requestId = requestContext.get(REQUEST_ID_STORE_KEY)
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
span.setAttribute(REQUEST_ID_STORE_KEY, requestId)
}
}

export class LokaliseBatchSpanProcessor extends BatchSpanProcessor {
onStart(span: Span) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const requestId = requestContext.get(REQUEST_ID_STORE_KEY)
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
span.setAttribute(REQUEST_ID_STORE_KEY, requestId)
}
}
4 changes: 2 additions & 2 deletions lib/plugins/requestContextProviderPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { randomUUID } from 'node:crypto'

import { requestContext } from '@fastify/request-context'
import type { CommonLogger } from '@lokalise/node-core'
import type {
FastifyReply,
FastifyRequest,
FastifyInstance,
HookHandlerDoneFunction,
FastifyServerOptions
FastifyServerOptions,
} from 'fastify'
import fp from 'fastify-plugin'
import { CommonLogger } from "@lokalise/node-core";

export const REQUEST_ID_STORE_KEY = 'request_id'

Expand Down

0 comments on commit d687ee2

Please sign in to comment.