Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5176586
Create README.md
leocavalcante Jul 12, 2023
6817212
chore(dev): prepar devex
leocavalcante Jul 12, 2023
3e7eeb6
feat: bring the changes
leocavalcante Jul 12, 2023
878f11a
chore(deps): Allows psr/http-message 1.x
leocavalcante Jul 26, 2023
f3759d2
feat: service.name and host.name from otel spec
leocavalcante Jul 26, 2023
cad2405
chore(deps): Bump
leocavalcante Jul 27, 2023
00b67db
fix: Defaults hostname to app name
leocavalcante Jul 27, 2023
077f5da
fix: Merge label values
leocavalcante Jul 27, 2023
30464f6
chore(docs): getting started
leocavalcante Aug 3, 2023
64d8034
Avoids high cardinality on metrics (#2)
leocavalcante Aug 16, 2023
253b975
Feat/uri sanitize new patterns (#3)
vs0uz4 Sep 14, 2023
e7d311c
Refactor URI sanitize patterns (#4)
vs0uz4 Sep 14, 2023
e0bf8ad
feat: Always add initial slash
leocavalcante Sep 15, 2023
c48ac23
Use only the path at the URI label (#6)
celosauro Oct 2, 2023
6804d04
fix/complying with the psr-4 standard (#7)
vs0uz4 Oct 13, 2023
25e2567
Assumes the root path (/) for urls without declared paths (#8)
lucas-angeli-gimenes Nov 8, 2023
6c2980c
Added: Sql Sanitization (#10)
lucas-angeli-gimenes Jan 10, 2024
c92e9fe
Add connect exceptions on HTTP client metrics (#9)
lukkas-lukkas Jan 22, 2024
df8f474
chore(deps): Bump hyper/metric 3.1 (#11)
cmontezano Jan 30, 2024
e1f2243
Add: Sanitização de AndroidID na URI (#12)
celosauro Apr 25, 2024
18c311b
FIX: regex to catch OID between 16 to 24 caracteres (#15)
fernandocorreia26 Apr 26, 2024
49b40a2
HTTP Pool Metrics (#17)
lucas-angeli-gimenes May 21, 2024
dbc5b40
Added: Ignore sha1 hashes in url (#19)
adrysson1 Jul 1, 2024
c435545
Add ignore path capability (#20)
flavioheleno Oct 10, 2024
a577307
Ignora URI (#21)
celosauro Feb 21, 2025
373a654
add e2eid uri sanitize (#22)
laurohenriqueappelt Mar 6, 2025
9819edd
Add: URI Mask config (#23)
celosauro Mar 27, 2025
439460d
Inclui padrão de sanitização para LIMIT e OFFSET no sanitizador de qu…
cmontezano Apr 1, 2025
b8867b9
Fix: Corrige padrões de sanitização de LIMIT e OFFSET para considerar…
cmontezano Apr 1, 2025
1be95d0
Bump hyperf 3.1 (#27)
luizmanhani Aug 18, 2025
6dd804c
Adiciona sanitização do parâmetro external-id na URI (#28)
lucashcaraujo23 Aug 22, 2025
3f46874
Adiciona sanitização do parâmetro bill-uuid na URI (#29)
jeffesonmaia Aug 27, 2025
dfb0870
Altera sanitização do UUID para permitir prefixos dinâmicos (#31)
jeffesonmaia Aug 28, 2025
af5a029
Adjust false positives from server errors (#30)
srgoogle23 Aug 28, 2025
725d62d
upkeep: Atualiza sanitização para suportar IDs prefixados e novos fom…
jeffesonmaia Sep 1, 2025
29c0d39
upkeep: Atualiza regex para suportar novos formatos de ID e adiciona …
jeffesonmaia Sep 2, 2025
41c6495
upkeep: Atualiza regex para suportar IDs prefixados e ajusta testes d…
jeffesonmaia Sep 2, 2025
a71e5c0
mask for phone number and email
annacia Oct 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .github/workflows/close-pull-request.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/release.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/vendor/
composer.lock
.idea
.vscode
*.cache
*.log
*.log
vendor/
99 changes: 99 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?php

$header = <<<'EOF'
This file is part of Hyperf + OpenCodeCo

@link https://opencodeco.dev
@document https://hyperf.wiki
@contact leo@opencodeco.dev
@license https://github.com/opencodeco/hyperf-metric/blob/main/LICENSE
EOF;

return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'@DoctrineAnnotation' => true,
'@PhpCsFixer' => true,
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
'separate' => 'none',
'location' => 'after_declare_strict',
],
'array_syntax' => [
'syntax' => 'short'
],
'list_syntax' => [
'syntax' => 'short'
],
'concat_space' => [
'spacing' => 'one'
],
'blank_line_before_statement' => [
'statements' => [
'declare',
],
],
'general_phpdoc_annotation_remove' => [
'annotations' => [
'author'
],
],
'ordered_imports' => [
'imports_order' => [
'class', 'function', 'const',
],
'sort_algorithm' => 'alpha',
],
'single_line_comment_style' => [
'comment_types' => [
],
],
'yoda_style' => [
'always_move_variable' => false,
'equal' => false,
'identical' => false,
],
'phpdoc_align' => [
'align' => 'left',
],
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line',
],
'constant_case' => [
'case' => 'lower',
],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'class_attributes_separation' => true,
'combine_consecutive_unsets' => true,
'declare_strict_types' => true,
'linebreak_after_opening_tag' => true,
'lowercase_static_reference' => true,
'no_useless_else' => true,
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'not_operator_with_space' => false,
'ordered_class_elements' => true,
'php_unit_strict' => false,
'phpdoc_separation' => false,
'single_quote' => true,
'standardize_not_equals' => true,
'multiline_comment_opening_closing' => true,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__)
)
->setUsingCache(true);
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) Hyperf
Copyright (c) Hyperf & OpenCodeCo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Hyperf Metric

🔭 Drop-in replacement for the `hyperf/metric` component.

Suited for special needs, especially for OpenTelemetry, New Relic and Dynatrace platforms.

## Getting started

### Install

#### Add OpenCodeCo's Composer repository:
```shell
composer config repositories.opencodeco composer https://composer.opencodeco.dev
```

#### Update your `hyperf/metric`:
```shell
composer update hyperf/metric
```
67 changes: 49 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,51 @@
"metrics",
"influxdb"
],
"description": "hyperf metric component",
"description": "Drop-in replacement for the Hyperf Metric component.",
"require": {
"php": ">=8.0",
"hyperf/codec": "~3.0.0",
"hyperf/contract": "~3.0.0",
"hyperf/engine": "^1.5|^2.3",
"hyperf/guzzle": "~3.0.0",
"hyperf/support": "~3.0.0",
"hyperf/utils": "~3.0.0",
"promphp/prometheus_client_php": "2.2.*",
"psr/container": "^1.0|^2.0",
"php": ">=8.1",
"hyperf/codec": "~3.1.0",
"hyperf/contract": "~3.1.0",
"hyperf/engine": "^2.3",
"hyperf/guzzle": "~3.1.0",
"hyperf/support": "~3.1.0",
"hyperf/utils": "~3.1.0",
"psr/container": "^1.0 || ^2.0",
"psr/event-dispatcher": "^1.0",
"psr/http-message": "^1.0|^2.0"
"psr/http-message": "^1.0 || ^2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.21",
"hyperf/async-queue": "^3.0",
"hyperf/config": "^3.0",
"hyperf/db-connection": "^3.0",
"hyperf/di": "^3.0",
"hyperf/event": "^3.0",
"hyperf/framework": "^3.0",
"hyperf/process": "^3.0",
"hyperf/redis": "^3.0",
"hyperf/testing": "^3.0",
"influxdb/influxdb-php": "^1.15",
"mockery/mockery": "^1.6",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-mockery": "^1.1",
"rector/rector": "^0.17.5",
"slickdeals/statsd": "^3.1",
"swoole/ide-helper": "^5.0"
},
"suggest": {
"slickdeals/statsd": "Required to use StatdD driver.",
"influxdb/influxdb-php": "Required to use InfluxDB driver.",
"hyperf/di": "Required to use annotations.",
"hyperf/event": "Required to use listeners for default metrics.",
"hyperf/http-server": "Required to capture routes in middleware.",
"hyperf/process": "Required to use standalone process, or you have to roll your own",
"hyperf/retry": "Required to use back-off retry implementation.",
"hyperf/http-server": "Required to capture routes in middleware."
"influxdb/influxdb-php": "Required to use InfluxDB driver.",
"promphp/prometheus_client_php": "Required to use Prometheus driver.(2.2.*)",
"slickdeals/statsd": "Required to use StatdD driver."
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Hyperf\\Metric\\": "src/"
Expand All @@ -42,15 +64,24 @@
"HyperfTest\\Metric\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"test": "co-phpunit",
"test:filter": "co-phpunit --prepend test/bootstrap.php -c phpunit.xml --colors=always --testdox --filter",
"test-coverage": "co-phpunit --coverage-clover clover.xml",
"cs-fix": "php-cs-fixer fix $1",
"analyse": "phpstan analyse --memory-limit=-1 -l 5 -c phpstan.neon",
"rector": "rector process --clear-cache"
},
"config": {
"optimize-autoloader": true,
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"phpstan/extension-installer": true
}
},
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
"dev-master": "3.1-dev"
},
"hyperf": {
"config": "Hyperf\\Metric\\ConfigProvider"
Expand Down
Loading