Skip to content

Commit

Permalink
Rename APPSIGNAL_ENVIRONMENT to public env version
Browse files Browse the repository at this point in the history
Rename the internal APPSIGNAL_ENVIRONMENT env var to the publicly known
APPSIGNAL_APP_ENV env var.

This makes all the agent config options consistent with each other.

[skip changeset] because it requires an agent update that will include
a changeset.
  • Loading branch information
tombruijn committed Apr 17, 2023
1 parent 3df00e4 commit 69e9aec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,13 @@ describe("Configuration", () => {

it("writes default configuration values to the environment", () => {
expect(env("_APPSIGNAL_ACTIVE")).toBeUndefined()
expect(env("_APPSIGNAL_APP_ENV")).toBeDefined()
expect(env("_APPSIGNAL_APP_NAME")).toBeUndefined()
expect(env("_APPSIGNAL_CA_FILE_PATH")).toMatch(/cert\/cacert\.pem$/)
expect(env("_APPSIGNAL_DNS_SERVERS")).toBeUndefined()
expect(env("_APPSIGNAL_ENABLE_HOST_METRICS")).toEqual("true")
expect(env("_APPSIGNAL_ENABLE_STATSD")).toBeUndefined()
expect(env("_APPSIGNAL_ENABLE_NGINX_METRICS")).toBeUndefined()
expect(env("_APPSIGNAL_ENVIRONMENT")).toBeDefined()
expect(env("_APPSIGNAL_FILES_WORLD_ACCESSIBLE")).toEqual("true")
expect(env("_APPSIGNAL_FILTER_DATA_KEYS")).toBeUndefined()
expect(env("_APPSIGNAL_HOSTNAME")).toBeUndefined()
Expand Down
2 changes: 1 addition & 1 deletion src/config/configmap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ export const ENV_TO_KEY_MAPPING: Record<string, keyof AppsignalOptions> = {

export const PRIVATE_ENV_MAPPING: Record<string, keyof AppsignalOptions> = {
_APPSIGNAL_ACTIVE: "active",
_APPSIGNAL_APP_ENV: "environment",
_APPSIGNAL_APP_NAME: "name",
_APPSIGNAL_CA_FILE_PATH: "caFilePath",
_APPSIGNAL_DNS_SERVERS: "dnsServers",
_APPSIGNAL_ENABLE_HOST_METRICS: "enableHostMetrics",
_APPSIGNAL_ENABLE_STATSD: "enableStatsd",
_APPSIGNAL_ENABLE_NGINX_METRICS: "enableNginxMetrics",
_APPSIGNAL_ENVIRONMENT: "environment",
_APPSIGNAL_FILES_WORLD_ACCESSIBLE: "filesWorldAccessible",
_APPSIGNAL_FILTER_PARAMETERS: "filterParameters",
_APPSIGNAL_FILTER_SESSION_DATA: "filterSessionData",
Expand Down

0 comments on commit 69e9aec

Please sign in to comment.