From 88923ee53fd7ce6f6799d50379b97fe659d159fd Mon Sep 17 00:00:00 2001 From: Fabrizio Ferri-Benedetti Date: Wed, 19 Nov 2025 11:41:05 +0100 Subject: [PATCH] Rename attribute --- docs/reference/edot-php/migration.md | 4 ++-- .../include/opentelemetry/semconv/deployment_attributes.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference/edot-php/migration.md b/docs/reference/edot-php/migration.md index 248761c1..517771ad 100644 --- a/docs/reference/edot-php/migration.md +++ b/docs/reference/edot-php/migration.md @@ -93,7 +93,7 @@ Switch from `php.ini`-based configuration to environment variables. The followin | `elastic_apm.service_name = my-app` | `OTEL_SERVICE_NAME=my-app` | Defines the logical service name | | `elastic_apm.server_url = http://...` | `OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318` | Sets OTLP exporter endpoint | | `elastic_apm.secret_token = token123` | `OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer token123"` | Sets auth header for OTLP exporter | -| `elastic_apm.environment = production` | `OTEL_RESOURCE_ATTRIBUTES=deployment.environment=production` | Adds environment context to exported data | +| `elastic_apm.environment = production` | `OTEL_RESOURCE_ATTRIBUTES=deployment.environment.name=production` | Adds environment context to exported data | ::::{tip} EDOT PHP does not require changes to your code or Composer configuration — instrumentation works automatically after package installation. @@ -140,7 +140,7 @@ The following are Elastic APM PHP agent settings that you can migrate to EDOT PH | `disable_instrumentations` | [`OTEL_PHP_DISABLED_INSTRUMENTATIONS`](https://opentelemetry.io/docs/languages/php/sdk/#configuration) | Comma-separated list of instrumentations to disable. | | `disable_send` | Not available | No direct option. Could potentially be simulated with custom exporters or filtering processors. | | `enabled` | [`ELASTIC_OTEL_ENABLED`](/reference/edot-php/configuration.md#general-configuration) | Enables or disables EDOT PHP instrumentation entirely. | -| `environment` | [`OTEL_RESOURCE_ATTRIBUTES`](https://opentelemetry.io/docs/languages/sdk-configuration/general/#otel_resource_attributes) | Add deployment metadata (e.g., `deployment.environment=prod`). | +| `environment` | [`OTEL_RESOURCE_ATTRIBUTES`](https://opentelemetry.io/docs/languages/sdk-configuration/general/#otel_resource_attributes) | Add deployment metadata (e.g., `deployment.environment.name=prod`). | | `global_labels` | [`OTEL_RESOURCE_ATTRIBUTES`](https://opentelemetry.io/docs/languages/sdk-configuration/general/#otel_resource_attributes) | Set global key-value pairs for all spans/metrics. | | `log_level` | [`OTEL_LOG_LEVEL`](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration), [`ELASTIC_OTEL_LOG_LEVEL_FILE`](/reference/edot-php/configuration.md#logging-configuration) | Controls log verbosity globally (`OTEL_LOG_LEVEL`) or per sink (e.g., file, stderr, syslog via `ELASTIC_OTEL_LOG_LEVEL_*`). | | `server_url` | [`OTEL_EXPORTER_OTLP_ENDPOINT`](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/#otel_exporter_otlp_endpoint) | Sets OTLP exporter endpoint. Defaults to `http://localhost:4318`. | diff --git a/prod/native/libsemconv/include/opentelemetry/semconv/deployment_attributes.h b/prod/native/libsemconv/include/opentelemetry/semconv/deployment_attributes.h index 8cbb5889..6cc0887d 100644 --- a/prod/native/libsemconv/include/opentelemetry/semconv/deployment_attributes.h +++ b/prod/native/libsemconv/include/opentelemetry/semconv/deployment_attributes.h @@ -36,7 +36,7 @@ namespace deployment */ OPENTELEMETRY_DEPRECATED static constexpr const char *kDeploymentEnvironment - = "deployment.environment"; + = "deployment.environment.name"; /** * Name of the deployment environment (aka deployment tier).