lakedrops / drupal-environment
Composer Plugin for Drupal Environments
Package info
gitlab.lakedrops.com/composer/plugin/drupal-environment
Type:composer-plugin
pkg:composer/lakedrops/drupal-environment
Requires
- php: >=8.1
- composer-plugin-api: ^2
- lakedrops/ai-catalog: ^1.0||dev-develop
- lakedrops/composer-json-utils: ^2.5||dev-develop
- lakedrops/drupal-config: ^1.0||dev-develop
- mxr576/ddqg-composer-audit: ^1.0
- zodiacmedia/drupal-libraries-installer: ^1.6 || ^2.0
Requires (Dev)
Suggests
None
Provides
None
Conflicts
- lakedrops/d10-project-scaffold: <1.0.42
- lakedrops/d11-project-scaffold: <1.0.25
Replaces
None
- dev-main
- v3.2.269
- v3.2.268
- v3.2.267
- v3.2.266
- v3.2.265
- v3.2.264
- v3.2.263
- v3.2.262
- v3.2.261
- v3.2.260
- v3.2.259
- v3.2.258
- v3.2.257
- v3.2.256
- v3.2.255
- v3.2.254
- v3.2.253
- v3.2.252
- v3.2.251
- v3.2.250
- v3.2.249
- v3.2.248
- v3.2.247
- v3.2.246
- v3.2.245
- v3.2.244
- v3.2.243
- v3.2.242
- v3.2.241
- v3.2.240
- v3.2.239
- v3.2.238
- v3.2.237
- v3.2.236
- v3.2.235
- v3.2.234
- v3.2.233
- v3.2.232
- v3.2.231
- v3.2.230
- v3.2.229
- v3.2.228
- v3.2.227
- v3.2.226
- v3.2.225
- v3.2.224
- v3.2.223
- v3.2.222
- v3.2.221
- v3.2.220
- v3.2.219
- v3.2.218
- v3.2.217
- v3.2.216
- v3.2.215
- v3.2.214
- v3.2.213
- v3.2.212
- v3.2.211
- v3.2.210
- v3.2.209
- v3.2.208
- v3.2.207
- v3.2.206
- v3.2.205
- v3.2.204
- v3.2.203
- v3.2.202
- v3.2.201
- v3.2.200
- v3.2.199
- v3.2.198
- v3.2.197
- v3.2.196
- v3.2.195
- v3.2.194
- v3.2.193
- v3.2.192
- v3.2.191
- v3.2.190
- v3.2.189
- v3.2.188
- v3.2.187
- v3.2.186
- v3.2.185
- v3.2.184
- v3.2.183
- v3.2.182
- v3.2.181
- v3.2.180
- v3.2.179
- v3.2.178
- v3.2.177
- v3.2.176
- v3.2.175
- v3.2.174
- v3.2.173
- v3.2.172
- v3.2.171
- v3.2.170
- v3.2.169
- v3.2.168
- v3.2.167
- v3.2.166
- v3.2.165
- v3.2.164
- v3.2.163
- v3.2.162
- v3.2.161
- v3.2.160
- v3.2.159
- v3.2.158
- v3.2.157
- v3.2.156
- v3.2.155
- v3.2.154
- v3.2.153
- v3.2.152
- v3.2.151
- v3.2.150
- v3.2.149
- v3.2.148
- v3.2.147
- v3.2.146
- v3.2.145
- v3.2.144
- v3.2.143
- v3.2.142
- v3.2.141
- v3.2.140
- v3.2.139
- v3.2.138
- v3.2.137
- v3.2.136
- v3.2.135
- v3.2.134
- v3.2.133
- v3.2.132
- v3.2.131
- v3.2.130
- v3.2.129
- v3.2.128
- v3.2.127
- v3.2.126
- v3.2.125
- v3.2.124
- v3.2.123
- v3.2.122
- v3.2.121
- v3.2.120
- v3.2.119
- v3.2.118
- v3.2.117
- v3.2.116
- v3.2.115
- v3.2.114
- v3.2.113
- v3.2.112
- v3.2.111
- v3.2.110
- v3.2.109
- v3.2.108
- v3.2.107
- v3.2.106
- v3.2.105
- v3.2.104
- v3.2.103
- v3.2.102
- v3.2.101
- v3.2.100
- v3.2.99
- v3.2.98
- v3.2.97
- v3.2.96
- v3.2.95
- v3.2.94
- v3.2.93
- v3.2.92
- v3.2.91
- v3.2.90
- v3.2.89
- v3.2.88
- v3.2.87
- v3.2.86
- v3.2.85
- v3.2.84
- v3.2.83
- v3.2.82
- v3.2.81
- v3.2.80
- v3.2.79
- v3.2.78
- v3.2.77
- v3.2.76
- v3.2.75
- v3.2.74
- v3.2.73
- v3.2.72
- v3.2.71
- v3.2.70
- v3.2.69
- v3.2.68
- v3.2.67
- v3.2.66
- v3.2.65
- v3.2.64
- v3.2.63
- v3.2.62
- v3.2.61
- v3.2.60
- v3.2.59
- v3.2.58
- v3.2.57
- v3.2.56
- v3.2.55
- v3.2.54
- v3.2.53
- v3.2.52
- v3.2.51
- v3.2.50
- v3.2.49
- v3.2.48
- v3.2.47
- v3.2.46
- v3.2.45
- v3.2.44
- v3.2.43
- v3.2.42
- v3.2.41
- v3.2.40
- v3.2.39
- v3.2.38
- v3.2.37
- v3.2.36
- v3.2.35
- v3.2.34
- v3.2.33
- v3.2.32
- v3.2.31
- v3.2.30
- v3.2.29
- v3.2.28
- v3.2.27
- v3.2.26
- v3.2.25
- v3.2.24
- v3.2.23
- v3.2.22
- v3.2.21
- v3.2.20
- v3.2.19
- v3.2.18
- v3.2.17
- v3.2.16
- v3.2.15
- v3.2.14
- v3.2.13
- v3.2.12
- v3.2.11
- v3.2.10
- v3.2.9
- v3.2.8
- v3.2.7
- v3.2.6
- v3.2.5
- v3.2.4
- v3.2.3
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.103
- v3.1.102
- v3.1.101
- v3.1.100
- v3.1.99
- v3.1.98
- v3.1.97
- v3.1.96
- v3.1.95
- v3.1.94
- v3.1.93
- v3.1.92
- v3.1.91
- v3.1.90
- v3.1.89
- v3.1.88
- v3.1.87
- v3.1.86
- v3.1.85
- v3.1.84
- v3.1.83
- v3.1.82
- v3.1.81
- v3.1.80
- v3.1.79
- v3.1.78
- v3.1.77
- v3.1.76
- v3.1.75
- v3.1.74
- v3.1.73
- v3.1.72
- v3.1.71
- v3.1.70
- v3.1.69
- v3.1.68
- v3.1.67
- v3.1.66
- v3.1.65
- v3.1.64
- v3.1.63
- v3.1.62
- v3.1.61
- v3.1.60
- v3.1.59
- v3.1.58
- v3.1.57
- v3.1.56
- v3.1.55
- v3.1.54
- v3.1.53
- v3.1.52
- v3.1.51
- v3.1.50
- v3.1.49
- v3.1.48
- v3.1.47
- v3.1.46
- v3.1.45
- v3.1.44
- v3.1.43
- v3.1.42
- v3.1.41
- v3.1.40
- v3.1.39
- v3.1.38
- v3.1.37
- v3.1.36
- v3.1.35
- v3.1.34
- v3.1.33
- v3.1.32
- v3.1.31
- v3.1.30
- v3.1.29
- v3.1.28
- v3.1.27
- v3.1.26
- v3.1.25
- v3.1.24
- v3.1.23
- v3.1.22
- v3.1.21
- v3.1.20
- v3.1.19
- v3.1.18
- v3.1.17
- v3.1.16
- v3.1.15
- v3.1.14
- v3.1.13
- v3.1.12
- v3.1.11
- v3.1.10
- v3.1.9
- v3.1.8
- v3.1.7
- v3.1.6
- v3.1.5
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.32
- v3.0.31
- v3.0.30
- v3.0.29
- v3.0.28
- v3.0.27
- v3.0.26
- v3.0.25
- v3.0.24
- v3.0.23
- v3.0.22
- v3.0.21
- v3.0.20
- v3.0.19
- v3.0.18
- v3.0.17
- v3.0.16
- v3.0.15
- v3.0.14
- v3.0.13
- v3.0.12
- v3.0.11
- v3.0.10
- v3.0.9
- v3.0.8
- v3.0.7
- v3.0.6
- v3.0.5
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.0.1
- v2.0.0
- v1.1.0
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-develop
- dev-feature/32-otel-export-timeout
- dev-feature/d12
- dev-plugintest
This package is auto-updated.
Last update: 2026-12-05 09:46:11 UTC
README
Composer plugin that creates the directory structure and the settings files
(settings.php, settings.local.php, services.yml,
development.services.yml) of LakeDrops Drupal projects at composer install
and with composer lakedrops:config. General documentation:
https://devops-tools.docs.lakedrops.com/composer/plugin/drupal-environment/.
OpenTelemetry
When OPENTELEMETRY_ENDPOINT is set while the settings are rendered,
settings.local.php configures the drupal/opentelemetry module:
| Setting | Source |
|---|---|
endpoint | OPENTELEMETRY_ENDPOINT |
authorization | OPENTELEMETRY_AUTH |
service_name | Drupal: <CI_PROJECT_NAME> (<CI_COMMIT_BRANCH>) in CI, Drupal: <COMPOSE_PROJECT_NAME> (<USER>@<host>) locally |
It also sets OTEL_RESOURCE_ATTRIBUTES, so that the OpenTelemetry SDK puts
these resource attributes on every log record, span and metric the module and
its submodules opentelemetry_logs and opentelemetry_metrics export:
| Attribute | Value | Missing when |
|---|---|---|
service.version | CI_COMMIT_SHA, the commit the site was built from | outside CI |
deployment.environment.name | CI_COMMIT_BRANCH, local outside CI | a CI build without a branch, e.g. of a tag |
vcs.repository.url.full | CI_PROJECT_URL, the GitLab project | outside CI |
host.name | the physical host the site runs on, see below | the host is unknown; the SDK then reports the container ID |
container.id | the container ID, at runtime | host.name is missing |
drupal.core.version | \Drupal::VERSION, at runtime | never |
The values are percent-encoded as the OpenTelemetry specification requires.
OpenObserve stores the attributes with underscores instead of dots, e.g.
service_version on logs and service_service_version on traces.
host.name comes from the first of these that is set:
OPENTELEMETRY_HOST_NAME, an explicit override.- The project topic
runner_<host>inCI_PROJECT_TOPICS: the deploy runners of a host take the jobs of the projects with that topic. Only exactly onerunner_*topic counts.
The settings are rendered in the build job, which does not run on the host
the site is deployed to, so the plugin does not read the host name of the
machine it runs on. The variable HOST_NAME of some projects' CI
configuration is not used either: deployments do not read it, and it is not
always the host the site runs on.
Export timeout
settings.local.php also sets OTEL_EXPORTER_OTLP_TIMEOUT, the time in
milliseconds that one attempt to export traces, logs or metrics may take:
1500 ms by default instead of the SDK's 10 000 ms. The module exports when the
request terminates, after the response is sent, but the PHP-FPM worker stays
busy until the export ends, and the exporter tries up to 4 times. With the
collector unreachable, an export then holds the worker for about 7 s instead
of 40 s.
Override the default with the variable OPENTELEMETRY_TIMEOUT while the
settings are rendered, or in the project's .lakedrops.yml, which takes
precedence:
lakedrops:
opentelemetry:
timeout: 3000
The variable is set with putenv() because PHP-FPM clears the environment of
its workers, so a variable of the container does not reach PHP.
Tests
Install the dependencies without activating Composer plugins in this plugin's own checkout, then run the integration test:
composer install --no-interaction --no-scripts --no-plugins
composer --no-plugins test
On an L3D host, run these commands through l3d .. The test renders the real
settings.local.php template with the real configuration class, includes the
result and decodes OTEL_RESOURCE_ATTRIBUTES and OTEL_EXPORTER_OTLP_TIMEOUT
the way the SDK does, for CI builds with one, two and no runner topics, with
OPENTELEMETRY_HOST_NAME, without a branch, for local development, for values
that need encoding, without an endpoint, and for the default export timeout
and its overrides by OPENTELEMETRY_TIMEOUT and the project config.