Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ecs Logging Bundle Laravel Package

aubes/ecs-logging-bundle

View on GitHub
Deep Wiki
Context7
3.1.1

Added

Fixed

  • FrankenPHP worker modeHttpRequestProcessor, UserProcessor, and EcsUserProvider are now tagged with kernel.reset, so Symfony clears their cached state between requests in worker mode.
  • EcsUserProvidersecurity.token_storage is now injected explicitly via DI arguments instead of autowiring.
3.1.0

Added

  • CorrelationIdProcessor — new processor that reads a correlation ID from Monolog extra and writes it to labels.correlation_id or trace.id. Works with any library that populates extra (e.g. aubes/correlation-bundle). The source key is removed from extra after processing.
  • TracingProcessor — new opentelemetry mode that reads flat trace_id/span_id/trace_flags keys injected by the OpenTelemetry Monolog processor and maps them to ECS fields. The flat keys are cleaned up from context automatically.
3.0.1

Fixed

  • Per-processor channels/handlers routing no longer inherits global defaults when the processor defines its own routing. Previously, a processor with only handlers configured would also inherit global channels, causing an "cannot target both channels and handlers" error.
3.0.0

Breaking Changes

  • PHP 8.2 minimum — PHP 8.1 (EOL since December 2024) is no longer supported.
  • Symfony LTS-only — supported versions are 6.4 (LTS), 7.4 (LTS), and 8.0. Intermediate versions (7.0–7.3) are not supported.
  • monolog.formatter.ecs now produces a different JSON structure: log.level is nested under log and lowercased (was a root-level dot-notation key). Existing Elasticsearch index mappings may need to be updated.
  • AutoLabelProcessor::FIELDS_ALL content has changed: os, vlan, interface, and tracing have been removed; entity (ECS 9.x) and gen_ai (ECS 9.1) have been added. If you reference this constant directly in code, review your usage.
  • AutoLabelProcessor — non-ECS fields are now dropped by default instead of being moved to labels. Add move_to_labels: true to restore the previous behaviour.
  • AutoLabelProcessor — the fields config key is replaced by mode (bundle | full | custom). Use mode: custom with fields: [...] for the previous behaviour of passing a raw list.
  • AutoLabelProcessor::FIELDS_MINIMAL constant removed. Use mode: bundle instead.
  • AbstractProcessorgetTargetField() and support() visibility changed from public to protected. Code calling these methods from outside a subclass will fail.
  • AbstractProcessorgetTargetField() is now final and no longer abstract. Subclasses must pass the target field name as the second argument to parent::__construct() instead of implementing getTargetField().
  • A misconfigured processor (enabled but no channel or handler defined) now throws an InvalidConfigurationException at container compile time. Previously it silently had no effect.
  • EcsUserProvidergetUserIdentifier() is now mapped to user.name instead of user.id. Symfony's identifier is a login or email (user.name), not a technical database ID (user.id). If you rely on user.id in your index mappings, implement a custom EcsUserProviderInterface.
  • tags config option — static tags added to every log record via the ECS tags field (e.g. ['env:prod', 'region:eu-west-1']). Passed through to the underlying ElasticCommonSchemaFormatter.

Added

  • ecs_version config option — declare which ECS version to output (default 9.3.0). Override for older Elastic Stack deployments (e.g. 8.11.0). Invalid values throw an InvalidConfigurationException at boot.
  • HttpRequestProcessor — injects ECS http.* and url.* fields from the current HTTP request. Optional include_full_url (disabled by default — may expose sensitive query parameters), include_client_ip (disabled by default), and include_referrer (disabled by default — Referer header may carry sensitive external URLs).
  • HostProcessor — injects ECS host.* fields (host.name, host.ip, host.architecture) resolved at boot time. Optional resolve_ip (default false) to auto-detect host.ip via DNS.
  • ErrorProcessor — new map_exception_key option to automatically process Symfony's context['exception'] as ECS error.*.
  • AutoLabelProcessor — new mode option (bundle | full | custom, default bundle) replacing the raw fields list. bundle whitelists fields used by this bundle's processors; full covers all ECS field sets; custom uses the explicit fields list.
  • AutoLabelProcessor — new move_to_labels option (default false). Non-ECS fields are now dropped by default; set move_to_labels: true to preserve them under labels as before.
  • AutoLabelProcessor — new include_extra option to also process non-ECS keys from Monolog's extra array.
  • AutoLabelProcessor — new non_scalar_strategy option (skip | json, default skip). Non-scalar context values are either dropped (skip) or JSON-encoded into labels (json) when move_to_labels is enabled.
  • TracingProcessor — new span_id input key. When present in the tracing array, injects ECS span.id into the log record.
  • processor.user.provider — the referenced service is now validated at container compile time: it must implement EcsUserProviderInterface. Invalid configurations throw at boot instead of silently failing at log time.
  • EcsUserProvider and UserProcessor — both implement ResetInterface for compatibility with FrankenPHP worker mode. State is cleared between requests automatically.

Fixed

  • AutoLabelProcessor — non-scalar values in non-ECS context fields were previously placed in labels as-is, violating ECS (labels must be scalar). They are now handled via non_scalar_strategy.
  • AutoLabelProcessor — a non-array context['labels'] value no longer throws \InvalidArgumentException at runtime. The invalid value is silently overwritten to preserve ECS compliance.
2.0.2

Fixed

  • AutoLabelProcessor — ensure it runs last and validate labels type.
  • Monolog configuration error.
2.0.1

Changed

  • Symfony 7 and 8 compatibility.

Fixed

  • Custom user providers configured via ecs_logging.processor.user.provider were never used.
  • Missing address field in configuration for the service processor.
2.0.0

Breaking Changes

  • Requires Symfony 7.x and Monolog 3.x. Symfony 6.x and Monolog 2.x are no longer supported.

Added

  • Symfony 7 and Monolog 3 compatibility.
1.0.0

Added

  • Initial release.
  • monolog.formatter.ecs service for ECS-compliant log formatting.
  • ServiceProcessor — injects static service metadata into every log record.
  • ErrorProcessor — converts a \Throwable in context to ECS error.*.
  • TracingProcessor — converts a tracing array in context to ECS trace.* / transaction.*.
  • UserProcessor — injects the current authenticated user as ECS user.*.
  • AutoLabelProcessor — moves non-ECS context keys into labels. Built-in field lists: FIELDS_MINIMAL, FIELDS_BUNDLE, FIELDS_ALL.
  • Symfony 6.4, 7.x, and 8.x compatibility.
  • PHP 8.1+ support.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle