Skip to content

Commit

Permalink
fix: removed deprecated INSTANA_URL and INSTANA_KEY environment varia…
Browse files Browse the repository at this point in the history
…bles (#1373)

BREAKING CHANGE:
- The INSTANA_URL and INSTANA_KEY environment variables have been removed. 
- Any references to these should be replaced with the environment variables INSTANA_ENDPOINT_URL and INSTANA_AGENT_KEY.
  • Loading branch information
aryamohanan committed Oct 23, 2024
1 parent cc7fe9c commit 955cf67
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 1 addition & 8 deletions packages/serverless/src/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ const logger = require('./console_logger');

const instanaEndpointUrlEnvVar = 'INSTANA_ENDPOINT_URL';
const instanaAgentKeyEnvVar = 'INSTANA_AGENT_KEY';
// The following two environment variables are deprecated and will be removed soon.
const deprecatedInstanaUrlEnvVar = 'INSTANA_URL';
const deprecatedInstanaKeyEnvVar = 'INSTANA_KEY';
const instanaZoneEnvVar = 'INSTANA_ZONE';

let valid = false;
Expand All @@ -29,11 +26,7 @@ exports.sendUnencrypted = process.env[exports.sendUnencryptedEnvVar] === 'true';
const customZone = process.env[instanaZoneEnvVar] ? process.env[instanaZoneEnvVar] : undefined;

exports.validate = function validate({ validateInstanaAgentKey } = {}) {
_validate(
process.env[instanaEndpointUrlEnvVar] || process.env[deprecatedInstanaUrlEnvVar],
process.env[instanaAgentKeyEnvVar] || process.env[deprecatedInstanaKeyEnvVar],
validateInstanaAgentKey
);
_validate(process.env[instanaEndpointUrlEnvVar], process.env[instanaAgentKeyEnvVar], validateInstanaAgentKey);
};

// exposed for testing
Expand Down
2 changes: 0 additions & 2 deletions packages/serverless/test/environment_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ describe('environment util', () => {
//
'INSTANA_ENDPOINT_URL',
'INSTANA_AGENT_KEY',
'INSTANA_URL',
'INSTANA_KEY',
'INSTANA_ZONE',
'INSTANA_TAGS'
];
Expand Down

0 comments on commit 955cf67

Please sign in to comment.