Skip to content

False prometheusNotBoostrapped error with multiplex handler #86

Open
@Tyler-Keith-Thompson

Description

@Tyler-Keith-Thompson

Steps to reproduce

Prometheus makes a few too many assumptions about my metrics system factory. I use the multiplex factory that comes from Apple and bootstrap prometheus with it, but then this code tries to cast the multiplexed factory and fails:

guard let prom = self.factory as? PrometheusWrappedMetricsFactory else {
    throw PrometheusError.prometheusFactoryNotBootstrapped(bootstrappedWith: "\(self.factory)")
}
return prom.client

Expected behavior

No error is thrown...cause it was in fact bootstrapped

Actual behavior

It throws the error

Environment

  • OS version:
  • Swift version:
  • Serverside Swift Framework:
  • Framework version:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions