diff --git a/CHANGELOG.md b/CHANGELOG.md index fedc8f0..74dfbf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [Unreleased] + +- api key fallback + ## [0.2.9] - 2023-11-04 - Add Request Body Parsing diff --git a/src/baselime.ts b/src/baselime.ts index 853a1c6..c39f3f4 100644 --- a/src/baselime.ts +++ b/src/baselime.ts @@ -34,7 +34,7 @@ export class BaselimeSDK { constructor(options: BaselimeSDKOpts) { options.serverless = options.serverless || false; options.collectorUrl = options.collectorUrl || process.env.COLLECTOR_URL || "https://otel.baselime.io/v1"; - options.baselimeKey = options.baselimeKey || process.env.BASELIME_KEY + options.baselimeKey = options.baselimeKey || process.env.BASELIME_API_KEY || process.env.BASELIME_KEY this.options = options;