File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 11# @elastic/ecs-pino-format Changelog
22
3+ ## v1.2.0
4+
5+ - Add an * internal testing-only* option (` opts._elasticApm ` ) to pass in the
6+ current loaded "elastic-apm-node" module for use in APM tracing integration.
7+ This option will be used by tests in the APM agent where the current agent
8+ import name is a local path rather than "elastic-apm-node" that this code
9+ normally uses.
10+
311## v1.1.2
412
513- Fix a circular-require for code that uses both this package and
Original file line number Diff line number Diff line change @@ -65,7 +65,13 @@ function createEcsPinoOptions (opts) {
6565 let apm = null
6666 let apmServiceName = null
6767 if ( apmIntegration ) {
68- if ( ! triedElasticApmImport ) {
68+ // istanbul ignore if
69+ if ( opts && opts . _elasticApm ) {
70+ // `opts._elasticApm` is an internal/testing-only option to be used
71+ // for testing in the APM agent where the import is a local path
72+ // rather than "elastic-apm-node".
73+ elasticApm = opts . _elasticApm
74+ } else if ( ! triedElasticApmImport ) {
6975 triedElasticApmImport = true
7076 // We lazily require this module here instead of at the top-level to
7177 // avoid a possible circular-require if the user code does
Original file line number Diff line number Diff line change 11{
22 "name" : " @elastic/ecs-pino-format" ,
3- "version" : " 1.1.2 " ,
3+ "version" : " 1.2.0 " ,
44 "description" : " A formatter for the pino logger compatible with Elastic Common Schema." ,
55 "main" : " index.js" ,
66 "files" : [
You can’t perform that action at this time.
0 commit comments