Code Monkey home page Code Monkey logo

correlation-id-symfony-bundle's Introduction

Correlation ID Symfony Bundle

PHP >= 8.1 phpstan Level 8 License: MIT Code Quality

This is a Symfony bridge for the framework agnostic Correlation ID library.

Features

  • Adds the Correlation ID to the Request and Response automatically.
    • Header names can be configured for each separately.
  • Provides a messenger stamp and middleware, that will add the CorrelationIDStamp to each message.

Installation

composer require phauthentic/correlation-id-symfony-bundle

Configuration

You can configure three different settings to control the behavior:

  • response_header_name - The name of the response header for the ID.
  • request_header_name - The name of the request header for the ID.
  • pass_through - If the ID from the request should be passed to the response enable this. This is useful if you are dealing with a microservice that is not exposed to the public but gets further actions delegated from the entry point and must retain the original ID.

config/correlation_id.yaml:

correlation_id:
    response_header_name: 'X-Correlation-ID'
    request_header_name: 'X-Correlation-ID'
    pass_through: false

Messenger Middleware

The messenger middleware will add the Correlation ID to your messages. Just add the middleware to your bus.

Copyright & License

Licensed under the MIT license.

Copyright (c) Phauthentic / Florian Krämer

correlation-id-symfony-bundle's People

Contributors

floriankraemer avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.