Unverified Commit e27b7e99 authored by Dale Bustad's avatar Dale Bustad Committed by GitHub

Telemetry-compatible tracing (#22713)

A number of changes here.  I recommend viewing the diff with the <a href="?w=1">whitespace flag enabled</a>.

- OpenTelemetry is replaced with a custom and lightweight tracing solution.
- Three trace targets are currently supported: console, Zipkin, and NextJS.
- Tracing is now governed by environment variables rather than `--require instrument.js`.
  + `TRACE_TARGET`: one of `CONSOLE`, `ZIPKIN`, or `TELEMETRY`; defaults to `TELEMETRY` if unset or invalid.
  + `TRACE_ID`: an 8-byte hex-encoded value used as the Zipkin trace ID; if not provided, this value will be randomly generated and passed down to subprocesses.

Other sundry:

- I'm missing something, probably a setup step, with the Zipkin target.  Traces are captured successfully, but you have to manually enter the Trace ID in order to view the trace - it doesn't show up in queries.
- I'm generally unhappy with [this commit](https://github.com/vercel/next.js/pull/22713/commits/235cedcb3ead76b630b4c8aa695f904489da2831).  It is... untidy to provide a telemetry object via `setGlobal`, but I don't have a ready alternative.  Is `distDir` strictly required when creating a new Telemetry object?  I didn't dig too deep here.

As noted, there are a lot of changes, so it'd be great if a reviewer could:

- [ ] pull down the branch and try to break it
- [ ] check the Zipkin traces and identify possible regressions in the functionality

Closes #22570
Fixes #22574
parent fa02b197
// Disable automatic instrumentation
process.env.OTEL_NO_PATCH_MODULES = '*'
const { NodeTracerProvider } = require('@opentelemetry/node')
const { SimpleSpanProcessor } = require('@opentelemetry/tracing')
const { ZipkinExporter } = require('@opentelemetry/exporter-zipkin')
const tracerProvider = new NodeTracerProvider({
// All automatic instrumentation plugins have to be disabled as it affects worker_thread/child_process bootup performance
plugins: {
mongodb: { enabled: false, path: '@opentelemetry/plugin-mongodb' },
grpc: { enabled: false, path: '@opentelemetry/plugin-grpc' },
'@grpc/grpc-js': { enabled: false, path: '@opentelemetry/plugin-grpc-js' },
http: { enabled: false, path: '@opentelemetry/plugin-http' },
https: { enabled: false, path: '@opentelemetry/plugin-https' },
mysql: { enabled: false, path: '@opentelemetry/plugin-mysql' },
pg: { enabled: false, path: '@opentelemetry/plugin-pg' },
redis: { enabled: false, path: '@opentelemetry/plugin-redis' },
ioredis: { enabled: false, path: '@opentelemetry/plugin-ioredis' },
'pg-pool': { enabled: false, path: '@opentelemetry/plugin-pg-pool' },
express: { enabled: false, path: '@opentelemetry/plugin-express' },
'@hapi/hapi': {
enabled: false,
path: '@opentelemetry/hapi-instrumentation',
},
koa: { enabled: false, path: '@opentelemetry/koa-instrumentation' },
dns: { enabled: false, path: '@opentelemetry/plugin-dns' },
},
})
tracerProvider.addSpanProcessor(
new SimpleSpanProcessor(
new ZipkinExporter({
serviceName: 'next-js',
})
)
)
tracerProvider.register()
......@@ -34,8 +34,6 @@
"publish-stable": "lerna version --force-publish",
"lint-staged": "lint-staged",
"next": "node --trace-deprecation packages/next/dist/bin/next",
"trace": "node --trace-deprecation -r ./bench/instrument.js packages/next/dist/bin/next",
"trace-debug": "node --inspect --trace-deprecation -r ./bench/instrument.js packages/next/dist/bin/next",
"debug": "node --inspect packages/next/dist/bin/next"
},
"pre-commit": "lint-staged",
......@@ -45,11 +43,6 @@
"@babel/preset-react": "7.12.10",
"@fullhuman/postcss-purgecss": "1.3.0",
"@mdx-js/loader": "0.18.0",
"@opentelemetry/exporter-zipkin": "0.14.0",
"@opentelemetry/node": "0.14.0",
"@opentelemetry/plugin-http": "0.14.0",
"@opentelemetry/plugin-https": "0.14.0",
"@opentelemetry/tracing": "0.14.0",
"@testing-library/react": "11.2.5",
"@types/cheerio": "0.22.16",
"@types/fs-extra": "8.1.0",
......
......@@ -2,7 +2,6 @@
import * as log from '../build/output/log'
import arg from 'next/dist/compiled/arg/index.js'
import { NON_STANDARD_NODE_ENV } from '../lib/constants'
import opentelemetryApi from '@opentelemetry/api'
;['react', 'react-dom'].forEach((dependency) => {
try {
// When 'npm link' is used it checks the clone location. Not the project.
......@@ -107,18 +106,7 @@ if (typeof React.Suspense === 'undefined') {
process.on('SIGTERM', () => process.exit(0))
process.on('SIGINT', () => process.exit(0))
commands[command]()
.then((exec) => exec(forwardedArgs))
.then(async () => {
if (command === 'build') {
// @ts-ignore getDelegate exists
const tp = opentelemetryApi.trace.getTracerProvider().getDelegate()
if (tp.shutdown) {
await tp.shutdown()
}
process.exit(0)
}
})
commands[command]().then((exec) => exec(forwardedArgs))
if (command === 'dev') {
const { CONFIG_FILE } = require('../next-server/lib/constants')
......
This diff is collapsed.
......@@ -29,9 +29,8 @@ import { removePathTrailingSlash } from '../client/normalize-trailing-slash'
import { UnwrapPromise } from '../lib/coalesced-function'
import { normalizeLocalePath } from '../next-server/lib/i18n/normalize-locale-path'
import * as Log from './output/log'
import opentelemetryApi from '@opentelemetry/api'
import { tracer, traceAsyncFn } from './tracer'
import { loadComponents } from '../next-server/server/load-components'
import { trace } from '../telemetry/trace'
const fileGzipStats: { [k: string]: Promise<number> } = {}
const fsStatGzip = (file: string) => {
......@@ -719,7 +718,7 @@ export async function isPageStatic(
runtimeEnvConfig: any,
locales?: string[],
defaultLocale?: string,
spanContext?: any
parentId?: any
): Promise<{
isStatic?: boolean
isAmpOnly?: boolean
......@@ -731,132 +730,115 @@ export async function isPageStatic(
prerenderFallback?: boolean | 'blocking'
isNextImageImported?: boolean
}> {
return opentelemetryApi.context.with(
opentelemetryApi.propagation.extract(
opentelemetryApi.context.active(),
spanContext
),
() => {
return traceAsyncFn(
tracer.startSpan('is-page-static-utils'),
async () => {
try {
require('../next-server/lib/runtime-config').setConfig(
runtimeEnvConfig
)
const components = await loadComponents(distDir, page, serverless)
const mod = components.ComponentMod
const Comp = mod.default || mod
if (
!Comp ||
!isValidElementType(Comp) ||
typeof Comp === 'string'
) {
throw new Error('INVALID_DEFAULT_EXPORT')
}
const hasGetInitialProps = !!(Comp as any).getInitialProps
const hasStaticProps = !!(await mod.getStaticProps)
const hasStaticPaths = !!(await mod.getStaticPaths)
const hasServerProps = !!(await mod.getServerSideProps)
const hasLegacyServerProps = !!(await mod.unstable_getServerProps)
const hasLegacyStaticProps = !!(await mod.unstable_getStaticProps)
const hasLegacyStaticPaths = !!(await mod.unstable_getStaticPaths)
const hasLegacyStaticParams = !!(await mod.unstable_getStaticParams)
if (hasLegacyStaticParams) {
throw new Error(
`unstable_getStaticParams was replaced with getStaticPaths. Please update your code.`
)
}
if (hasLegacyStaticPaths) {
throw new Error(
`unstable_getStaticPaths was replaced with getStaticPaths. Please update your code.`
)
}
if (hasLegacyStaticProps) {
throw new Error(
`unstable_getStaticProps was replaced with getStaticProps. Please update your code.`
)
}
if (hasLegacyServerProps) {
throw new Error(
`unstable_getServerProps was replaced with getServerSideProps. Please update your code.`
)
}
// A page cannot be prerendered _and_ define a data requirement. That's
// contradictory!
if (hasGetInitialProps && hasStaticProps) {
throw new Error(SSG_GET_INITIAL_PROPS_CONFLICT)
}
if (hasGetInitialProps && hasServerProps) {
throw new Error(SERVER_PROPS_GET_INIT_PROPS_CONFLICT)
}
if (hasStaticProps && hasServerProps) {
throw new Error(SERVER_PROPS_SSG_CONFLICT)
}
const pageIsDynamic = isDynamicRoute(page)
// A page cannot have static parameters if it is not a dynamic page.
if (hasStaticProps && hasStaticPaths && !pageIsDynamic) {
throw new Error(
`getStaticPaths can only be used with dynamic pages, not '${page}'.` +
`\nLearn more: https://nextjs.org/docs/routing/dynamic-routes`
)
}
if (hasStaticProps && pageIsDynamic && !hasStaticPaths) {
throw new Error(
`getStaticPaths is required for dynamic SSG pages and is missing for '${page}'.` +
`\nRead more: https://err.sh/next.js/invalid-getstaticpaths-value`
)
}
let prerenderRoutes: Array<string> | undefined
let encodedPrerenderRoutes: Array<string> | undefined
let prerenderFallback: boolean | 'blocking' | undefined
if (hasStaticProps && hasStaticPaths) {
;({
paths: prerenderRoutes,
fallback: prerenderFallback,
encodedPaths: encodedPrerenderRoutes,
} = await buildStaticPaths(
page,
mod.getStaticPaths,
locales,
defaultLocale
))
}
const isNextImageImported = (global as any).__NEXT_IMAGE_IMPORTED
const config = mod.config || {}
return {
isStatic:
!hasStaticProps && !hasGetInitialProps && !hasServerProps,
isHybridAmp: config.amp === 'hybrid',
isAmpOnly: config.amp === true,
prerenderRoutes,
prerenderFallback,
encodedPrerenderRoutes,
hasStaticProps,
hasServerProps,
isNextImageImported,
}
} catch (err) {
if (err.code === 'MODULE_NOT_FOUND') return {}
throw err
}
}
)
const isPageStaticSpan = trace('is-page-static-utils', parentId)
return isPageStaticSpan.traceAsyncFn(async () => {
try {
require('../next-server/lib/runtime-config').setConfig(runtimeEnvConfig)
const components = await loadComponents(distDir, page, serverless)
const mod = components.ComponentMod
const Comp = mod.default || mod
if (!Comp || !isValidElementType(Comp) || typeof Comp === 'string') {
throw new Error('INVALID_DEFAULT_EXPORT')
}
const hasGetInitialProps = !!(Comp as any).getInitialProps
const hasStaticProps = !!(await mod.getStaticProps)
const hasStaticPaths = !!(await mod.getStaticPaths)
const hasServerProps = !!(await mod.getServerSideProps)
const hasLegacyServerProps = !!(await mod.unstable_getServerProps)
const hasLegacyStaticProps = !!(await mod.unstable_getStaticProps)
const hasLegacyStaticPaths = !!(await mod.unstable_getStaticPaths)
const hasLegacyStaticParams = !!(await mod.unstable_getStaticParams)
if (hasLegacyStaticParams) {
throw new Error(
`unstable_getStaticParams was replaced with getStaticPaths. Please update your code.`
)
}
if (hasLegacyStaticPaths) {
throw new Error(
`unstable_getStaticPaths was replaced with getStaticPaths. Please update your code.`
)
}
if (hasLegacyStaticProps) {
throw new Error(
`unstable_getStaticProps was replaced with getStaticProps. Please update your code.`
)
}
if (hasLegacyServerProps) {
throw new Error(
`unstable_getServerProps was replaced with getServerSideProps. Please update your code.`
)
}
// A page cannot be prerendered _and_ define a data requirement. That's
// contradictory!
if (hasGetInitialProps && hasStaticProps) {
throw new Error(SSG_GET_INITIAL_PROPS_CONFLICT)
}
if (hasGetInitialProps && hasServerProps) {
throw new Error(SERVER_PROPS_GET_INIT_PROPS_CONFLICT)
}
if (hasStaticProps && hasServerProps) {
throw new Error(SERVER_PROPS_SSG_CONFLICT)
}
const pageIsDynamic = isDynamicRoute(page)
// A page cannot have static parameters if it is not a dynamic page.
if (hasStaticProps && hasStaticPaths && !pageIsDynamic) {
throw new Error(
`getStaticPaths can only be used with dynamic pages, not '${page}'.` +
`\nLearn more: https://nextjs.org/docs/routing/dynamic-routes`
)
}
if (hasStaticProps && pageIsDynamic && !hasStaticPaths) {
throw new Error(
`getStaticPaths is required for dynamic SSG pages and is missing for '${page}'.` +
`\nRead more: https://err.sh/next.js/invalid-getstaticpaths-value`
)
}
let prerenderRoutes: Array<string> | undefined
let encodedPrerenderRoutes: Array<string> | undefined
let prerenderFallback: boolean | 'blocking' | undefined
if (hasStaticProps && hasStaticPaths) {
;({
paths: prerenderRoutes,
fallback: prerenderFallback,
encodedPaths: encodedPrerenderRoutes,
} = await buildStaticPaths(
page,
mod.getStaticPaths,
locales,
defaultLocale
))
}
const isNextImageImported = (global as any).__NEXT_IMAGE_IMPORTED
const config = mod.config || {}
return {
isStatic: !hasStaticProps && !hasGetInitialProps && !hasServerProps,
isHybridAmp: config.amp === 'hybrid',
isAmpOnly: config.amp === true,
prerenderRoutes,
prerenderFallback,
encodedPrerenderRoutes,
hasStaticProps,
hasServerProps,
isNextImageImported,
}
} catch (err) {
if (err.code === 'MODULE_NOT_FOUND') return {}
throw err
}
)
})
}
export async function hasCustomGetInitialProps(
......
import { createHash } from 'crypto'
import { tracer, traceAsyncFn, traceFn } from '../../../../tracer'
import { trace } from '../../../../../telemetry/trace'
import transform from './transform'
import cacache from 'next/dist/compiled/cacache'
async function read(cacheDirectory, etag) {
const cachedResult = await traceAsyncFn(
tracer.startSpan('read-cache-file'),
async () => await cacache.get(cacheDirectory, etag)
const cachedResult = await trace('read-cache-file').traceAsyncFn(() =>
cacache.get(cacheDirectory, etag)
)
return JSON.parse(cachedResult.data)
}
function write(cacheDirectory, etag, data) {
return traceAsyncFn(tracer.startSpan('write-cache-file'), () =>
return trace('write-cache-file').traceAsyncFn(() =>
cacache.put(cacheDirectory, etag, JSON.stringify(data))
)
}
const etag = function (source, identifier, options) {
return traceFn(tracer.startSpan('etag'), () => {
return trace('etag').traceFn(() => {
const hash = createHash('md4')
const contents = JSON.stringify({ source, options, identifier })
......@@ -31,8 +29,9 @@ const etag = function (source, identifier, options) {
}
export default async function handleCache(params) {
const span = tracer.startSpan('handle-cache')
return traceAsyncFn(span, async () => {
const span = trace('handle-cache')
return span.traceAsyncFn(async () => {
const { source, options = {}, cacheIdentifier, cacheDirectory } = params
const file = etag(source, cacheIdentifier)
......@@ -47,12 +46,9 @@ export default async function handleCache(params) {
// Otherwise just transform the file
// return it to the user asap and write it in cache
const result = await traceAsyncFn(
tracer.startSpan('transform'),
async () => {
return transform(source, options)
}
)
const result = await trace('transform').traceAsyncFn(async () => {
return transform(source, options)
})
await write(cacheDirectory, file, result)
......
import loaderUtils from 'next/dist/compiled/loader-utils'
import { tracer, traceFn } from '../../tracer'
export type ClientPagesLoaderOptions = {
absolutePagePath: string
......@@ -8,27 +7,28 @@ export type ClientPagesLoaderOptions = {
// this parameter: https://www.typescriptlang.org/docs/handbook/functions.html#this-parameters
function nextClientPagesLoader(this: any) {
return tracer.withSpan(this.currentTraceSpan, () => {
const span = tracer.startSpan('next-client-pages-loader')
return traceFn(span, () => {
const { absolutePagePath, page } = loaderUtils.getOptions(
this
) as ClientPagesLoaderOptions
const pagesLoaderSpan = this.currentTraceSpan.traceChild(
'next-client-pages-loader'
)
span.setAttribute('absolutePagePath', absolutePagePath)
return pagesLoaderSpan.traceFn(() => {
const { absolutePagePath, page } = loaderUtils.getOptions(
this
) as ClientPagesLoaderOptions
const stringifiedAbsolutePagePath = JSON.stringify(absolutePagePath)
const stringifiedPage = JSON.stringify(page)
pagesLoaderSpan.setAttribute('absolutePagePath', absolutePagePath)
return `
(window.__NEXT_P = window.__NEXT_P || []).push([
${stringifiedPage},
function () {
return require(${stringifiedAbsolutePagePath});
}
]);
`
})
const stringifiedAbsolutePagePath = JSON.stringify(absolutePagePath)
const stringifiedPage = JSON.stringify(page)
return `
(window.__NEXT_P = window.__NEXT_P || []).push([
${stringifiedPage},
function () {
return require(${stringifiedAbsolutePagePath});
}
]);
`
})
}
......
......@@ -11,7 +11,7 @@ import {
ROUTES_MANIFEST,
REACT_LOADABLE_MANIFEST,
} from '../../../../next-server/lib/constants'
import { tracer, traceFn } from '../../../tracer'
import { trace } from '../../../../telemetry/trace'
export type ServerlessLoaderQuery = {
page: string
......@@ -34,8 +34,8 @@ export type ServerlessLoaderQuery = {
}
const nextServerlessLoader: webpack.loader.Loader = function () {
const span = tracer.startSpan('next-serverless-loader')
return traceFn(span, () => {
const loaderSpan = trace('next-serverless-loader')
return loaderSpan.traceFn(() => {
const {
distDir,
absolutePagePath,
......
......@@ -4,7 +4,7 @@ import path from 'path'
import bfj from 'next/dist/compiled/bfj'
import { spans } from './profiling-plugin'
import { webpack } from 'next/dist/compiled/webpack/webpack'
import { tracer, traceAsyncFn } from '../../tracer'
import { trace } from '../../../telemetry/trace'
const STATS_VERSION = 0
......@@ -75,46 +75,45 @@ export default class BuildStatsPlugin {
compiler.hooks.done.tapAsync(
'NextJsBuildStats',
async (stats, callback) => {
tracer.withSpan(spans.get(compiler), async () => {
try {
const writeStatsSpan = tracer.startSpan('NextJsBuildStats')
await traceAsyncFn(writeStatsSpan, () => {
return new Promise((resolve, reject) => {
const statsJson = reduceSize(
stats.toJson({
all: false,
cached: true,
reasons: true,
entrypoints: true,
chunks: true,
errors: false,
warnings: false,
maxModules: Infinity,
chunkModules: true,
modules: true,
// @ts-ignore this option exists
ids: true,
})
)
const fileStream = fs.createWriteStream(
path.join(this.distDir, 'next-stats.json')
)
const jsonStream = bfj.streamify({
version: STATS_VERSION,
stats: statsJson,
const compilerSpan = spans.get(compiler)
try {
const writeStatsSpan = trace('NextJsBuildStats', compilerSpan?.id)
await writeStatsSpan.traceAsyncFn(() => {
return new Promise((resolve, reject) => {
const statsJson = reduceSize(
stats.toJson({
all: false,
cached: true,
reasons: true,
entrypoints: true,
chunks: true,
errors: false,
warnings: false,
maxModules: Infinity,
chunkModules: true,
modules: true,
// @ts-ignore this option exists
ids: true,
})
jsonStream.pipe(fileStream)
jsonStream.on('error', reject)
fileStream.on('error', reject)
jsonStream.on('dataError', reject)
fileStream.on('close', resolve)
)
const fileStream = fs.createWriteStream(
path.join(this.distDir, 'next-stats.json')
)
const jsonStream = bfj.streamify({
version: STATS_VERSION,
stats: statsJson,
})
jsonStream.pipe(fileStream)
jsonStream.on('error', reject)
fileStream.on('error', reject)
jsonStream.on('dataError', reject)
fileStream.on('close', resolve)
})
callback()
} catch (err) {
callback(err)
}
})
})
callback()
} catch (err) {
callback(err)
}
}
)
}
......
......@@ -6,7 +6,7 @@ import {
isWebpack5,
sources,
} from 'next/dist/compiled/webpack/webpack'
import { tracer, traceAsyncFn } from '../../tracer'
import { trace } from '../../../telemetry/trace'
import { spans } from './profiling-plugin'
// https://github.com/NMFR/optimize-css-assets-webpack-plugin/blob/0a410a9bf28c7b0e81a3470a13748e68ca2f50aa/src/index.js#L20
......@@ -70,47 +70,44 @@ export class CssMinimizerPlugin {
stage: webpack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE,
},
async (assets: any) => {
return tracer.withSpan(spans.get(compiler), () => {
const span = tracer.startSpan('css-minimizer-plugin', {
attributes: {
webpackVersion: 5,
},
})
return traceAsyncFn(span, async () => {
const files = Object.keys(assets)
await Promise.all(
files
.filter((file) => CSS_REGEX.test(file))
.map(async (file) => {
const assetSpan = tracer.startSpan('minify-css', {
attributes: {
file,
},
})
return traceAsyncFn(span, async () => {
const asset = assets[file]
const etag = cache.getLazyHashedEtag(asset)
const cachedResult = await cache.getPromise(file, etag)
assetSpan.setAttribute(
'cache',
cachedResult ? 'HIT' : 'MISS'
)
if (cachedResult) {
assets[file] = cachedResult
return
}
const result = await this.optimizeAsset(file, asset)
await cache.storePromise(file, etag, result)
assets[file] = result
})
const compilerSpan = spans.get(compiler)
const cssMinimizerSpan = trace(
'css-minimizer-plugin',
compilerSpan?.id
)
cssMinimizerSpan.setAttribute('webpackVersion', 5)
return cssMinimizerSpan.traceAsyncFn(async () => {
const files = Object.keys(assets)
await Promise.all(
files
.filter((file) => CSS_REGEX.test(file))
.map(async (file) => {
const assetSpan = trace('minify-css', cssMinimizerSpan.id)
assetSpan.setAttribute('file', file)
return assetSpan.traceAsyncFn(async () => {
const asset = assets[file]
const etag = cache.getLazyHashedEtag(asset)
const cachedResult = await cache.getPromise(file, etag)
assetSpan.setAttribute(
'cache',
cachedResult ? 'HIT' : 'MISS'
)
if (cachedResult) {
assets[file] = cachedResult
return
}
const result = await this.optimizeAsset(file, asset)
await cache.storePromise(file, etag, result)
assets[file] = result
})
)
})
})
)
})
}
)
......@@ -119,42 +116,38 @@ export class CssMinimizerPlugin {
compilation.hooks.optimizeChunkAssets.tapPromise(
'CssMinimizerPlugin',
(chunks: webpack.compilation.Chunk[]) => {
return tracer.withSpan(spans.get(compiler), () => {
const span = tracer.startSpan('css-minimizer-plugin', {
attributes: {
webpackVersion: 4,
compilationName: compilation.name,
},
})
return traceAsyncFn(span, async () => {
const res = await Promise.all(
chunks
.reduce(
(acc, chunk) => acc.concat(chunk.files || []),
[] as string[]
)
.filter((entry) => CSS_REGEX.test(entry))
.map(async (file) => {
const assetSpan = tracer.startSpan('minify-css', {
attributes: {
file,
},
})
return traceAsyncFn(assetSpan, async () => {
const asset = compilation.assets[file]
// Makes trace attributes the same as webpack 5
// When using webpack 4 the result is not cached
assetSpan.setAttribute('cache', 'MISS')
compilation.assets[file] = await this.optimizeAsset(
file,
asset
)
})
const compilerSpan = spans.get(compiler)
const cssMinimizerSpan = trace(
'css-minimizer-plugin',
compilerSpan?.id
)
cssMinimizerSpan.setAttribute('webpackVersion', 4)
cssMinimizerSpan.setAttribute('compilationName', compilation.name)
return cssMinimizerSpan.traceAsyncFn(async () => {
return await Promise.all(
chunks
.reduce(
(acc, chunk) => acc.concat(chunk.files || []),
[] as string[]
)
.filter((entry) => CSS_REGEX.test(entry))
.map(async (file) => {
const assetSpan = trace('minify-css', cssMinimizerSpan.id)
assetSpan.setAttribute('file', file)
return assetSpan.traceAsyncFn(async () => {
const asset = compilation.assets[file]
// Makes trace attributes the same as webpack 5
// When using webpack 4 the result is not cached
assetSpan.setAttribute('cache', 'MISS')
compilation.assets[file] = await this.optimizeAsset(
file,
asset
)
})
)
return res
})
})
)
})
}
)
......
import { tracer, stackPush, stackPop } from '../../tracer'
import { webpack, isWebpack5 } from 'next/dist/compiled/webpack/webpack'
import {
Span,
trace,
ProxyTracerProvider,
NoopTracerProvider,
} from '@opentelemetry/api'
import { trace, stackPush, stackPop, Span } from '../../../telemetry/trace'
const pluginName = 'ProfilingPlugin'
export const spans = new WeakMap()
export const spans = new WeakMap<any, Span>()
function getNormalModuleLoaderHook(compilation: any) {
if (isWebpack5) {
......@@ -19,23 +13,10 @@ function getNormalModuleLoaderHook(compilation: any) {
return compilation.hooks.normalModuleLoader
}
function tracingIsEnabled() {
const tracerProvider: any = trace.getTracerProvider()
if (tracerProvider instanceof ProxyTracerProvider) {
const proxyDelegate: any = tracerProvider.getDelegate()
return !(proxyDelegate instanceof NoopTracerProvider)
}
return false
}
export class ProfilingPlugin {
compiler: any
apply(compiler: any) {
// Only enable plugin when instrumentation is loaded
if (!tracingIsEnabled()) {
return
}
this.traceTopLevelHooks(compiler)
this.traceCompilationHooks(compiler)
this.compiler = compiler
......@@ -46,7 +27,7 @@ export class ProfilingPlugin {
startHook: any,
stopHook: any,
attrs?: any,
onSetSpan?: (span: Span | undefined) => void
onSetSpan?: (span: Span) => void
) {
let span: Span | undefined
startHook.tap(pluginName, () => {
......@@ -60,7 +41,7 @@ export class ProfilingPlugin {
if (!span) {
return
}
stackPop(this.compiler, span, spanName)
stackPop(this.compiler, span)
})
}
......@@ -72,7 +53,7 @@ export class ProfilingPlugin {
}
})
stopHook.tap(pluginName, () => {
stackPop(this.compiler, span, spanName)
stackPop(this.compiler, span)
})
}
......@@ -82,7 +63,7 @@ export class ProfilingPlugin {
compiler.hooks.compile,
compiler.hooks.done,
() => {
return { attributes: { name: compiler.name } }
return { name: compiler.name }
},
(span) => spans.set(compiler, span)
)
......@@ -115,11 +96,10 @@ export class ProfilingPlugin {
if (!compilerSpan) {
return
}
tracer.withSpan(compilerSpan, () => {
const span = tracer.startSpan('build-module')
span.setAttribute('name', module.userRequest)
spans.set(module, span)
})
const span = trace('build-module', compilerSpan.id)
span.setAttribute('name', module.userRequest)
spans.set(module, span)
})
getNormalModuleLoaderHook(compilation).tap(
......@@ -131,7 +111,7 @@ export class ProfilingPlugin {
)
compilation.hooks.succeedModule.tap(pluginName, (module: any) => {
spans.get(module).end()
spans.get(module)?.stop()
})
this.traceHookPair(
......
......@@ -46,8 +46,7 @@ import { PrerenderManifest } from '../build'
import exportPage from './worker'
import { PagesManifest } from '../build/webpack/plugins/pages-manifest-plugin'
import { getPagePath } from '../next-server/server/require'
import { tracer, traceFn, traceAsyncFn } from '../build/tracer'
import opentelemetryApi from '@opentelemetry/api'
import { trace } from '../telemetry/trace'
const exists = promisify(existsOrig)
......@@ -137,20 +136,21 @@ export default async function exportApp(
options: ExportOptions,
configuration?: NextConfig
): Promise<void> {
const nextExportSpan = tracer.startSpan('next-export')
return traceAsyncFn(nextExportSpan, async () => {
const nextExportSpan = trace('next-export')
return nextExportSpan.traceAsyncFn(async () => {
dir = resolve(dir)
// attempt to load global env values so they are available in next.config.js
traceFn(tracer.startSpan('load-dotenv'), () =>
loadEnvConfig(dir, false, Log)
)
nextExportSpan
.traceChild('load-dotenv')
.traceFn(() => loadEnvConfig(dir, false, Log))
const nextConfig =
configuration ||
(await traceAsyncFn(tracer.startSpan('load-next-config'), () =>
loadConfig(PHASE_EXPORT, dir)
))
(await nextExportSpan
.traceChild('load-next-config')
.traceAsyncFn(() => loadConfig(PHASE_EXPORT, dir)))
const threads = options.threads || Math.max(cpus().length - 1, 1)
const distDir = join(dir, nextConfig.distDir)
......@@ -276,9 +276,11 @@ export default async function exportApp(
if (!options.silent) {
Log.info('Copying "static" directory')
}
await traceAsyncFn(tracer.startSpan('copy-static-directory'), () =>
recursiveCopy(join(dir, 'static'), join(outDir, 'static'))
)
await nextExportSpan
.traceChild('copy-static-directory')
.traceAsyncFn(() =>
recursiveCopy(join(dir, 'static'), join(outDir, 'static'))
)
}
// Copy .next/static directory
......@@ -289,12 +291,14 @@ export default async function exportApp(
if (!options.silent) {
Log.info('Copying "static build" directory')
}
await traceAsyncFn(tracer.startSpan('copy-next-static-directory'), () =>
recursiveCopy(
join(distDir, CLIENT_STATIC_FILES_PATH),
join(outDir, '_next', CLIENT_STATIC_FILES_PATH)
await nextExportSpan
.traceChild('copy-next-static-directory')
.traceAsyncFn(() =>
recursiveCopy(
join(distDir, CLIENT_STATIC_FILES_PATH),
join(outDir, '_next', CLIENT_STATIC_FILES_PATH)
)
)
)
}
// Get the exportPathMap from the config file
......@@ -321,14 +325,14 @@ export default async function exportApp(
}
if (!options.buildExport) {
const { isNextImageImported } = await traceAsyncFn(
tracer.startSpan('is-next-image-imported'),
() =>
const { isNextImageImported } = await nextExportSpan
.traceChild('is-next-image-imported')
.traceAsyncFn(() =>
promises
.readFile(join(distDir, EXPORT_MARKER), 'utf8')
.then((text) => JSON.parse(text))
.catch(() => ({}))
)
)
if (isNextImageImported && loader === 'default' && !hasNextSupport) {
throw new Error(
......@@ -376,9 +380,9 @@ export default async function exportApp(
if (!options.silent && !options.buildExport) {
Log.info(`Launching ${threads} workers`)
}
const exportPathMap = await traceAsyncFn(
tracer.startSpan('run-export-path-map'),
() =>
const exportPathMap = await nextExportSpan
.traceChild('run-export-path-map')
.traceAsyncFn(() =>
nextConfig.exportPathMap(defaultPathMap, {
dev: false,
dir,
......@@ -386,7 +390,7 @@ export default async function exportApp(
distDir,
buildId,
})
)
)
if (
!options.buildExport &&
......@@ -483,14 +487,16 @@ export default async function exportApp(
if (!options.silent) {
Log.info('Copying "public" directory')
}
await traceAsyncFn(tracer.startSpan('copy-public-directory'), () =>
recursiveCopy(publicDir, outDir, {
filter(path) {
// Exclude paths used by pages
return !exportPathMap[path]
},
})
)
await nextExportSpan
.traceChild('copy-public-directory')
.traceAsyncFn(() =>
recursiveCopy(publicDir, outDir, {
filter(path) {
// Exclude paths used by pages
return !exportPathMap[path]
},
})
)
}
const worker = new Worker(require.resolve('./worker'), {
......@@ -508,17 +514,10 @@ export default async function exportApp(
await Promise.all(
filteredPaths.map(async (path) => {
const pageExportSpan = tracer.startSpan('export-page', {
attributes: { path },
})
return traceAsyncFn(pageExportSpan, async () => {
const spanContext = {}
opentelemetryApi.propagation.inject(
opentelemetryApi.context.active(),
spanContext
)
const pageExportSpan = nextExportSpan.traceChild('export-page')
pageExportSpan.setAttribute('path', path)
return pageExportSpan.traceAsyncFn(async () => {
const result = await worker.default({
path,
pathMap: exportPathMap[path],
......@@ -533,7 +532,7 @@ export default async function exportApp(
optimizeFonts: nextConfig.experimental.optimizeFonts,
optimizeImages: nextConfig.experimental.optimizeImages,
optimizeCss: nextConfig.experimental.optimizeCss,
spanContext,
parentSpanId: pageExportSpan.id,
})
for (const validation of result.ampValidations || []) {
......
This diff is collapsed.
......@@ -34,6 +34,7 @@ import { normalizePagePath } from '../next-server/server/normalize-page-path'
import Router, { Params, route } from '../next-server/server/router'
import { eventCliSession } from '../telemetry/events'
import { Telemetry } from '../telemetry/storage'
import { setGlobal } from '../telemetry/trace'
import HotReloader from './hot-reloader'
import { findPageFile } from './lib/find-page-file'
import { getNodeOptionsWithoutInspect } from './lib/utils'
......@@ -297,6 +298,8 @@ export default class DevServer extends Server {
isCustomServer: this.isCustomServer,
})
)
// This is required by the tracing subsystem.
setGlobal('telemetry', telemetry)
}
protected async close(): Promise<void> {
......
import api, { Span } from '@opentelemetry/api'
import { trace, Span } from './trace'
export const tracer = api.trace.getTracer('next', process.env.__NEXT_VERSION)
const stacks = new WeakMap<any, Array<Span>>()
const stoppedSpansSets = new WeakMap<any, Set<Span>>()
const compilerStacks = new WeakMap()
const compilerStoppedSpans = new WeakMap()
export function stackPush(compiler: any, spanName: string, attrs?: any): any {
let stack = compilerStacks.get(compiler)
export function stackPush(keyObj: any, spanName: string, attrs?: any): Span {
let stack = stacks.get(keyObj)
let span
if (!stack) {
compilerStacks.set(compiler, (stack = []))
span = tracer.startSpan(spanName, attrs ? attrs() : undefined)
stack = []
stacks.set(keyObj, stack)
span = trace(spanName, undefined, attrs ? attrs() : undefined)
} else {
const parent = stack[stack.length - 1]
if (parent) {
tracer.withSpan(parent, () => {
span = tracer.startSpan(spanName, attrs ? attrs() : undefined)
})
span = trace(spanName, parent.id, attrs ? attrs() : undefined)
} else {
span = tracer.startSpan(spanName, attrs ? attrs() : undefined)
span = trace(spanName, undefined, attrs ? attrs() : undefined)
}
}
......@@ -27,23 +24,23 @@ export function stackPush(compiler: any, spanName: string, attrs?: any): any {
return span
}
export function stackPop(compiler: any, span: any, associatedName?: string) {
let stack = compilerStacks.get(compiler)
export function stackPop(keyObj: any, span: any): void {
let stack = stacks.get(keyObj)
if (!stack) {
console.warn(
'Attempted to pop from non-existent stack. Compiler reference must be bad.'
console.info(
'Attempted to pop from non-existent stack. Key reference must be bad.'
)
return
}
let stoppedSpans: Set<Span> = compilerStoppedSpans.get(compiler)
let stoppedSpans = stoppedSpansSets.get(keyObj)
if (!stoppedSpans) {
stoppedSpans = new Set()
compilerStoppedSpans.set(compiler, stoppedSpans)
stoppedSpansSets.set(keyObj, stoppedSpans)
}
if (stoppedSpans.has(span)) {
console.warn(
`Attempted to terminate tracing span that was already stopped for ${associatedName}`
console.info(
`Attempted to terminate tracing span that was already stopped for ${span.name}`
)
return
}
......@@ -51,50 +48,24 @@ export function stackPop(compiler: any, span: any, associatedName?: string) {
while (true) {
let poppedSpan = stack.pop()
if (poppedSpan === span) {
if (poppedSpan && poppedSpan === span) {
stoppedSpans.add(poppedSpan)
span.end()
span.stop()
stoppedSpans.add(span)
break
} else if (poppedSpan === undefined || stack.indexOf(span) === -1) {
// We've either reached the top of the stack or the stack doesn't contain
// the span for another reason.
console.warn(`Tracing span was not found in stack for: ${associatedName}`)
console.info(`Tracing span was not found in stack for: ${span.name}`)
stoppedSpans.add(span)
span.end()
span.stop()
break
} else if (stack.indexOf(span) !== -1) {
console.warn(
`Attempted to pop span that was not at top of stack for: ${associatedName}`
console.info(
`Attempted to pop span that was not at top of stack for: ${span.name}`
)
stoppedSpans.add(poppedSpan)
poppedSpan.end()
poppedSpan.stop()
}
}
}
export function traceFn<T extends (...args: unknown[]) => ReturnType<T>>(
span: Span,
fn: T
): ReturnType<T> {
return tracer.withSpan(span, () => {
try {
return fn()
} finally {
span.end()
}
})
}
export function traceAsyncFn<T extends (...args: unknown[]) => ReturnType<T>>(
span: Span,
fn: T
): Promise<ReturnType<T>> {
return tracer.withSpan(span, async () => {
try {
return await fn()
} finally {
span.end()
}
})
}
import { trace, Span, SpanStatus } from './trace'
import { SpanId, setGlobal } from './shared'
import { stackPush, stackPop } from './autoparent'
export { trace, SpanId, Span, SpanStatus, stackPush, stackPop, setGlobal }
import { TARGET, SpanId } from '../shared'
import reportToConsole from './to-console'
import reportToZipkin from './to-zipkin'
import reportToTelemetry from './to-telemetry'
type Reporter = (
spanName: string,
duration: number,
timestamp: number,
id: SpanId,
parentId?: SpanId,
attrs?: Object
) => void
const target =
process.env.TRACE_TARGET && process.env.TRACE_TARGET in TARGET
? TARGET[process.env.TRACE_TARGET as TARGET]
: TARGET.TELEMETRY
if (process.env.TRACE_TARGET && !target) {
console.info(
'For TRACE_TARGET, please specify one of: CONSOLE, ZIPKIN, TELEMETRY'
)
}
export let report: Reporter
if (target === TARGET.CONSOLE) {
report = reportToConsole
} else if (target === TARGET.ZIPKIN) {
report = reportToZipkin
} else {
report = reportToTelemetry
}
const idToName = new Map<string, string>()
const reportToConsole = (
spanName: string,
duration: number,
_timestamp: number,
id: string,
parentId?: string,
attrs?: Object
) => {
idToName.set(id, spanName)
const parentStr =
parentId && idToName.has(parentId)
? `, parent: ${idToName.get(parentId)}`
: ''
const attrsStr = attrs
? `, ${Object.entries(attrs)
.map(([key, val]) => `${key}: ${val}`)
.join(', ')}`
: ''
console.log(`[trace] ${spanName} took ${duration} μs${parentStr}${attrsStr}`)
}
export default reportToConsole
import { traceGlobals } from '../shared'
const TRACE_EVENT_WHITELIST = new Map(
Object.entries({
'webpack-invalidated': 'WEBPACK_INVALIDATED',
})
)
const reportToTelemetry = (spanName: string, duration: number) => {
const eventName = TRACE_EVENT_WHITELIST.get(spanName)
if (!eventName) {
return
}
const telemetry = traceGlobals.get('telemetry')
if (!telemetry) {
return
}
telemetry.record({
eventName,
payload: {
durationInMicroseconds: duration,
},
})
}
export default reportToTelemetry
import { randomBytes } from 'crypto'
import fetch from 'node-fetch'
let traceId = process.env.TRACE_ID
if (!traceId) {
traceId = process.env.TRACE_ID = randomBytes(8).toString('hex')
}
const localEndpoint = {
serviceName: 'zipkin-query',
ipv4: '127.0.0.1',
port: 9411,
}
const zipkinUrl = `http://${localEndpoint.ipv4}:${localEndpoint.port}/api/v2/spans`
const reportToLocalHost = (
name: string,
duration: number,
timestamp: number,
id: string,
parentId?: string,
attrs?: Object
) => {
const body = [
{
traceId,
parentId,
name,
id,
timestamp,
duration,
localEndpoint,
tags: attrs,
},
]
// We intentionally do not block on I/O here.
fetch(zipkinUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body),
}).catch(() => {})
}
export default reportToLocalHost
export enum TARGET {
CONSOLE = 'CONSOLE',
ZIPKIN = 'ZIPKIN',
TELEMETRY = 'TELEMETRY',
}
export type SpanId = string
export const traceGlobals: Map<any, any> = new Map()
export const setGlobal = (key: any, val: any) => {
traceGlobals.set(key, val)
}
import { randomBytes } from 'crypto'
import { SpanId } from './shared'
import { report } from './report'
const NUM_OF_MICROSEC_IN_SEC = BigInt('1000')
const getId = () => randomBytes(8).toString('hex')
export enum SpanStatus {
Started,
Stopped,
}
export class Span {
name: string
id: SpanId
parentId?: SpanId
duration: number | null
attrs: { [key: string]: any }
status: SpanStatus
_start: bigint
constructor(name: string, parentId?: SpanId, attrs?: Object) {
this.name = name
this.parentId = parentId
this.duration = null
this.attrs = attrs ? { ...attrs } : {}
this.status = SpanStatus.Started
this.id = getId()
this._start = process.hrtime.bigint()
}
// Durations are reported as microseconds. This gives 1000x the precision
// of something like Date.now(), which reports in milliseconds.
// Additionally, ~285 years can be safely represented as microseconds as
// a float64 in both JSON and JavaScript.
stop() {
const end: bigint = process.hrtime.bigint()
const duration = (end - this._start) / NUM_OF_MICROSEC_IN_SEC
this.status = SpanStatus.Stopped
if (duration > Number.MAX_SAFE_INTEGER) {
throw new Error(`Duration is too long to express as float64: ${duration}`)
}
const timestamp = this._start / NUM_OF_MICROSEC_IN_SEC
report(
this.name,
Number(duration),
Number(timestamp),
this.id,
this.parentId,
this.attrs
)
}
traceChild(name: string, attrs?: Object) {
return new Span(name, this.id, attrs)
}
setAttribute(key: string, value: any) {
this.attrs[key] = value
}
traceFn(fn: any) {
try {
return fn()
} finally {
this.stop()
}
}
async traceAsyncFn(fn: any) {
try {
return await fn()
} finally {
this.stop()
}
}
}
export const trace = (name: string, parentId?: SpanId, attrs?: Object) => {
return new Span(name, parentId, attrs)
}
......@@ -2488,103 +2488,18 @@
"@octokit/openapi-types" "^4.0.2"
"@types/node" ">= 8"
"@opentelemetry/api@0.14.0", "@opentelemetry/api@^0.14.0":
"@opentelemetry/api@0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-0.14.0.tgz#4e17d8d2f1da72b19374efa7b6526aa001267cae"
integrity sha512-L7RMuZr5LzMmZiQSQDy9O1jo0q+DaLy6XpYJfIGfYSfoJA5qzYwUP3sP1uMIQ549DvxAgM3ng85EaPTM/hUHwQ==
dependencies:
"@opentelemetry/context-base" "^0.14.0"
"@opentelemetry/context-async-hooks@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/context-async-hooks/-/context-async-hooks-0.14.0.tgz#34b77e87060bea2489b16f55168c35a580c5de50"
integrity sha512-BgAPWbmelvL/xhI0B17aidyw24E1D69PlKjDZD1L5AI050Glg1+pa6W0jMSoZltnM27Bc+Pc9n22fqxa4kvLRg==
dependencies:
"@opentelemetry/context-base" "^0.14.0"
"@opentelemetry/context-base@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/context-base/-/context-base-0.14.0.tgz#c67fc20a4d891447ca1a855d7d70fa79a3533001"
integrity sha512-sDOAZcYwynHFTbLo6n8kIbLiVF3a3BLkrmehJUyEbT9F+Smbi47kLGS2gG2g0fjBLR/Lr1InPD7kXL7FaTqEkw==
"@opentelemetry/core@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-0.14.0.tgz#35870e58e3d084dfc4dea99c973f3cf7479b3c6a"
integrity sha512-HJ4VM0cV6c5qjdW7C7koB2IT4ADunCOehxnKFRslQkbDqAEA1w42AZ9679siYALpWYxNqcJyqF2jxCNtfNHa6Q==
dependencies:
"@opentelemetry/api" "^0.14.0"
"@opentelemetry/context-base" "^0.14.0"
semver "^7.1.3"
"@opentelemetry/exporter-zipkin@0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/exporter-zipkin/-/exporter-zipkin-0.14.0.tgz#35281d96bd101c0c1a48837868ba8249a0332f7f"
integrity sha512-cg/86iRK64NSGEcWOTzTfqMByyAu8udi3HgcYP2r0WF8JseabfhrlnBp/4/ba4HuoaGe8uXVRmvDT0uAguhO8w==
dependencies:
"@opentelemetry/api" "^0.14.0"
"@opentelemetry/core" "^0.14.0"
"@opentelemetry/resources" "^0.14.0"
"@opentelemetry/tracing" "^0.14.0"
"@opentelemetry/node@0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/node/-/node-0.14.0.tgz#20af865de191a6b14443d619bb08d49003e64b19"
integrity sha512-79egldZKRIqXArjLHD8SYTJUfY5PrcFZll4+ykfbz23vy/CXEVev+1S8bS8bkE08DUNzskDuiFYlLdWTY8fdrQ==
dependencies:
"@opentelemetry/api" "^0.14.0"
"@opentelemetry/context-async-hooks" "^0.14.0"
"@opentelemetry/core" "^0.14.0"
"@opentelemetry/tracing" "^0.14.0"
require-in-the-middle "^5.0.0"
semver "^7.1.3"
"@opentelemetry/plugin-http@0.14.0", "@opentelemetry/plugin-http@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/plugin-http/-/plugin-http-0.14.0.tgz#5c5ac23bd3a5cbd8891fce857d52a86bb0dbf51c"
integrity sha512-j6VHSotl+geN+znYgGgn/GohTAirAtHum8Zpc52VZ/WQCrNfHcmEf4NYaGCuz5tW2EgmbH+66iDM/lgNadQuQg==
dependencies:
"@opentelemetry/api" "^0.14.0"
"@opentelemetry/core" "^0.14.0"
"@opentelemetry/semantic-conventions" "^0.14.0"
semver "^7.1.3"
shimmer "^1.2.1"
"@opentelemetry/plugin-https@0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/plugin-https/-/plugin-https-0.14.0.tgz#60a0db56339de497b35aaae0de91b10ecff9b0ea"
integrity sha512-FyT3iaEO9CdGu1EeIe+JmAwfoYwjG9GtHiyWSovFEKO/0OLQLrXA2AQDgltOeelu/snPGB2MF92iPqbpfVdhHw==
dependencies:
"@opentelemetry/api" "^0.14.0"
"@opentelemetry/core" "^0.14.0"
"@opentelemetry/plugin-http" "^0.14.0"
"@opentelemetry/semantic-conventions" "^0.14.0"
semver "^7.1.3"
shimmer "^1.2.1"
"@opentelemetry/resources@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-0.14.0.tgz#e89378931b4e02d4b6fb526d237d9594db2bb68a"
integrity sha512-7XVML4HxvoH6kWY+x0mhMc5m0a2YBvPCTSX7yAqyp9XIGvFpdjzAE2ggJ40DZrL1sPv9f0QYAbnIKFDVLBTfGA==
dependencies:
"@opentelemetry/api" "^0.14.0"
"@opentelemetry/core" "^0.14.0"
"@opentelemetry/semantic-conventions@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-0.14.0.tgz#7b48f4300709b34cef0beed8099b79e4a5907886"
integrity sha512-iDGRLQwo+ka1ljlLo4KyuUmzsJwtPw+PyCjetQwn3m/pTXjdyWLGOTARBrpQGpkQp7k87RaCCg5AqZaKFU2G6g==
"@opentelemetry/tracing@0.14.0", "@opentelemetry/tracing@^0.14.0":
version "0.14.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/tracing/-/tracing-0.14.0.tgz#f1e528b90def213a454ca410ca2d460acfacbe3f"
integrity sha512-sw9lXJQUQO0xaCvHWFUzIhgh2jGFgXubRQ6g1O84Q/ILU93ZMMVt+d97mihcrtBrV89Sy39HF8tAwekjpzv+cA==
dependencies:
"@opentelemetry/api" "^0.14.0"
"@opentelemetry/context-base" "^0.14.0"
"@opentelemetry/core" "^0.14.0"
"@opentelemetry/resources" "^0.14.0"
"@opentelemetry/semantic-conventions" "^0.14.0"
"@polka/url@^1.0.0-next.9":
version "1.0.0-next.11"
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.11.tgz#aeb16f50649a91af79dbe36574b66d0f9e4d9f71"
......@@ -11071,10 +10986,6 @@ modify-values@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022"
module-details-from-path@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/module-details-from-path/-/module-details-from-path-1.0.3.tgz#114c949673e2a8a35e9d35788527aa37b679da2b"
moment@^2.24.0:
version "2.24.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
......@@ -13990,15 +13901,6 @@ require-from-string@^1.1.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418"
require-in-the-middle@^5.0.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/require-in-the-middle/-/require-in-the-middle-5.1.0.tgz#b768f800377b47526d026bbf5a7f727f16eb412f"
integrity sha512-M2rLKVupQfJ5lf9OvqFGIT+9iVLnTmjgbOmpil12hiSQNn5zJTKGPoIisETNjfK+09vP3rpm1zJajmErpr2sEQ==
dependencies:
debug "^4.1.1"
module-details-from-path "^1.0.3"
resolve "^1.12.0"
require-like@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/require-like/-/require-like-0.1.2.tgz#ad6f30c13becd797010c468afa775c0c0a6b47fa"
......@@ -14614,11 +14516,6 @@ shellwords@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
shimmer@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337"
integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==
side-channel@^1.0.2, side-channel@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment