FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
correlation-bundle/src/Debug/TraceableStorageCompilerPass.php at main · aubes/correlation-bundle · GitHub
aubes
/
correlation-bundle
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Issues
0
Pull requests
0
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
correlation-bundle
/
src
/
Debug
/
TraceableStorageCompilerPass.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
40 lines (33 loc) · 1.64 KB
Breadcrumbs
correlation-bundle
/
src
/
Debug
/
TraceableStorageCompilerPass.php
Copy path
File metadata and controls
40 lines (33 loc) · 1.64 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
declare
(strict_types=
1
);
namespace
Aubes
\
CorrelationBundle
\
Debug
;
use
Aubes
\
CorrelationBundle
\
DataCollector
\
CorrelationIdDataCollector
;
use
Aubes
\
CorrelationBundle
\
Generator
\
CorrelationIdGeneratorInterface
;
use
Aubes
\
CorrelationBundle
\
Storage
\
CorrelationIdStorageInterface
;
use
Symfony
\
Component
\
DependencyInjection
\
Compiler
\
CompilerPassInterface
;
use
Symfony
\
Component
\
DependencyInjection
\
ContainerBuilder
;
use
Symfony
\
Component
\
DependencyInjection
\
Reference
;
final
class
TraceableStorageCompilerPass
implements
CompilerPassInterface
{
public
function
process
(
ContainerBuilder
$
container
):
void
{
if
(!
$
container
->
has
(
'
profiler
'
)) {
return
;
}
if
(
$
container
->
hasParameter
(
'
kernel.debug
'
) &&
$
container
->
getParameter
(
'
kernel.debug
'
) !==
true
) {
return
;
}
$
container
->
register
(TraceableCorrelationIdStorage::class, TraceableCorrelationIdStorage::class)
->
setDecoratedService
(CorrelationIdStorageInterface::class)
->
setArgument
(
'
$decorated
'
,
new
Reference
(
'
.inner
'
))
->
addTag
(
'
kernel.reset
'
, [
'
method
'
=>
'
reset
'
]);
$
container
->
register
(CorrelationIdDataCollector::class, CorrelationIdDataCollector::class)
->
setArgument
(
'
$storage
'
,
new
Reference
(TraceableCorrelationIdStorage::class))
->
setArgument
(
'
$generator
'
,
new
Reference
(CorrelationIdGeneratorInterface::class))
->
setArgument
(
'
$integrations
'
,
'
%correlation.integrations%
'
)
->
addTag
(
'
data_collector
'
, [
'
template
'
=>
'
@Correlation/Collector/correlation_id.html.twig
'
,
'
id
'
=>
'
correlation_id
'
,
]);
}
}
Back
|
FazBrowse Home
|
New Git URL