Comments (21)
Hello @JanThiel !
Thank you for this report (perfect, as always).
Let me find what's going on…
from wp-decalog.
Hello @JanThiel !
I'm currently working on this fu***ng issue and wondering if you're in development or production profile (I think it's development profile, but I need to be sure)?
from wp-decalog.
I've made a fix what I assume is the error. I will release the new version in some minutes ;)
from wp-decalog.
Although it might be too late, the environment is setup with these:
define( 'WP_ENVIRONMENT_TYPE', 'staging' );
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', false );
define( 'SAVEQUERIES', true );
I believe that triggers DEV mode :-)
from wp-decalog.
Yes :)
Normally, the 3.6.3 release solves this problem. Can you provide me with feedback once you have tested it? Nothing urgent, eh!
from wp-decalog.
Just tested and it looks fixed to me :-) Thank you very much Pierre!
from wp-decalog.
Hey @Pierre-Lannoy I do have to reopen this issue. 3.6.3 and more sites on PHP 8.1 are popping this error again.
from wp-decalog.
Hello @JanThiel !
Sorry to hear that :/
That's very strange, I haven't released new version since some months now.
Did you have modified something to wp-cli (version, environment, etc.)?
from wp-decalog.
Hmmm ... wait a sec ... It's not PHP8 related obviously. The page that's causing the issues is still on PHP 7.4.
In this particular case the issue is triggered by ObjectCachePro (Redis Object Cache implementation)
from wp-decalog.
I believe the source of the issue is within a try/catch block when an exception is thrown.
from wp-decalog.
Wait, too much speed for me ;)
So, your website is executed with PHP 7.4. When an error is thrown in ObjectCachePro, you have a huge flood of "Metric not found" in your log. Am I right?
Is it only when you use wp-cli with PHP 8.1?
from wp-decalog.
So, your website is executed with PHP 7.4
Yes
When an error is thrown in ObjectCachePro, you have a huge flood of "Metric not found" in your log. Am I right?
Yes
Is it only when you use wp-cli with PHP 8.1?
This was no CLI context at all. In particular this was a call against the REST API
from wp-decalog.
Hello @JanThiel !
Can you give some details about your DecaLog configuration and how this error is produced (i.e. why and when the OCPro error is thrown) ? I almost sure it is not the same as the previous one…
from wp-decalog.
@Pierre-Lannoy Sure as always!
This is the Decalog Config:
define('DECALOG_DEFAULT_LOGGERS', array(
'113b90f4-3e4f-4909-b01e-11c4ed84db11' => array (
'name' => 'Datadog Events',
'handler' => 'DatadogHandler',
'running' => true,
'level' => '250',
'privacy' => array (
'obfuscation' => false,
'pseudonymization' => false,
),
'processors' => array (
0 => 'WordpressProcessor',
1 => 'WWWProcessor',
2 => 'IntrospectionProcessor',
3 => 'BacktraceProcessor',
),
'configuration' => array (
'host' => 'https://http-intake.logs.datadoghq.eu/v1/input',
'token' => '<TOKEN>',
'buffer' => true,
),
)
));
And this is the code triggering the log entries:
::command
....
try {
$result = $node->command($name, $parameters);
$this->lastCommand = $node->lastCommand;
return $result;
} catch (Throwable $th) {
try {
$this->connectToSentinels();
} catch (ConnectionException $ex) {
throw new ConnectionException($ex->getMessage(), $ex->getCode(), $th);
}
}
....
::connectToSentinels
....
try {
$this->sentinel = $url;
$this->establishConnections($url);
$this->setPool();
return;
} catch (Throwable $error) {
$this->sentinels[$url] = false;
if ($this->config->debug) {
error_log('objectcache.notice: ' . $error->getMessage());
}
}
...
from wp-decalog.
Thanks @JanThiel 😊
I've found where it comes from. It's a "snake biting its own tail" problem: this exception (thrown by OCPro) is thrown at a time when metrics have not been already defined in DecaLog (it is very early in the loading sequence, which makes sense regarding what OCPro is doing). And DecaLog try to increment a PHP error counter which is inexistent…
The only way to get around this is to have an option to "bypass" this behavior. It will be implemented in 3.7.0 but note it will not be activated by default. So, you will have to UNCHECK "Warn about non existent metrics" in options to activate this new behavior.
from wp-decalog.
Sounds reasonable :-)
Great job undigging that ugly timing issue...
from wp-decalog.
Version 3.7.0 released. Could you confirm it fixes this issue?
from wp-decalog.
Hi @Pierre-Lannoy,
took some time. Sorry for that.
We sadly can still reproduce this issue with 3.7.1. Caused by the exact same Code as before.
from wp-decalog.
Hi @JanThiel
Wow! I'm just asking as a matter of fact but I'm sure the answer is yes: is the corresponding option unchecked ("Warn about non-existent metrics")?
from wp-decalog.
🤔 No, to be honest I did not change any settings - wasn't aware of that :-/. So that is most probable the reason why it wasn't "fixed" :-)
I changed that setting now and will report back within the next weeks which is hopefully free of this error then :)
from wp-decalog.
Looks god now. Sorry for the confusion. I close this issue.
Best Regards!
Jan
from wp-decalog.
Related Issues (20)
- [3.6.0] Call to undefined method WP_CLI::get_logger()“ at `./wp-content/plugins/decalog/includes/plugin/class-initializer.php:64`. HOT 6
- [Performance] Optimize / Reduce (expensive) log events HOT 7
- CLI commands 'wp log listener enable/disable' work incorrectly HOT 3
- Site 247 integrations would be great
- Documentation on prometheus integrations HOT 1
- Jaeger service name support HOT 2
- HTTP headers for propagating trace and span context HOT 1
- Unable to send metrics to Grafana Cloud HOT 12
- Provide OpenTelemetry semantics compatibility
- OpenTelemetry-compatible backends (OTLP)
- [Datadogformatter] Reduced set of status level used for event submission HOT 3
- decalog.io broken HOT 2
- Grafana Clound Tracing with Tempo gives Error 405 Method Not Allowed HOT 5
- Modifying Ray config variables HOT 2
- How to add another observability provider to the loggers list HOT 3
- HTTP logger for log collector/forwarder service (eg Vector or fluent bit)
- Incompatibility of Decalog with version 8 elastic HOT 1
- WP-CLI Out Of Memory on search-replace actions with large serialized objects - Buffer? HOT 11
- PHP Fatal error: Declaration of Decalog\Logger::emergency must be compatible with Psr\Log\LoggerInterface::emergency HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp-decalog.