diff --git a/Common/Attribute/AttributesBuilder.php b/Common/Attribute/AttributesBuilder.php index a81c104..0667438 100644 --- a/Common/Attribute/AttributesBuilder.php +++ b/Common/Attribute/AttributesBuilder.php @@ -81,9 +81,6 @@ public function offsetSet($offset, $value): void } $this->attributes[$offset] = $this->normalizeValue($value); - //@todo "There SHOULD be a message printed in the SDK's log to indicate to the user that an attribute was - // discarded due to such a limit. To prevent excessive logging, the message MUST be printed at most - // once per (i.e., not per discarded attribute)." } /** diff --git a/Metrics/Meter.php b/Metrics/Meter.php index 0f4cceb..db3798f 100644 --- a/Metrics/Meter.php +++ b/Metrics/Meter.php @@ -81,7 +81,7 @@ public function updateConfigurator(Configurator $configurator): void $this->config = $configurator->resolve($this->instrumentationScope); $startTimestamp = $this->clock->now(); - foreach ($this->instruments->observers[self::instrumentationScopeId($this->instrumentationScope)] as [$instrument, $stalenessHandler, $r]) { + foreach ($this->instruments->observers[self::instrumentationScopeId($this->instrumentationScope)] ?? [] as [$instrument, $stalenessHandler, $r]) { if ($this->config->isEnabled() && $r->dormant) { $this->metricFactory->createAsynchronousObserver( $this->registry, @@ -98,7 +98,7 @@ public function updateConfigurator(Configurator $configurator): void $r->dormant = true; } } - foreach ($this->instruments->writers[self::instrumentationScopeId($this->instrumentationScope)] as [$instrument, $stalenessHandler, $r]) { + foreach ($this->instruments->writers[self::instrumentationScopeId($this->instrumentationScope)] ?? [] as [$instrument, $stalenessHandler, $r]) { if ($this->config->isEnabled() && $r->dormant) { $this->metricFactory->createSynchronousWriter( $this->registry,