You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

54 line
1.6 KiB

  1. // Copyright 2017, OpenCensus Authors
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package internal
  15. import (
  16. "time"
  17. )
  18. // Trace allows internal access to some trace functionality.
  19. // TODO(#412): remove this
  20. var Trace interface{}
  21. // LocalSpanStoreEnabled true if the local span store is enabled.
  22. var LocalSpanStoreEnabled bool
  23. // BucketConfiguration stores the number of samples to store for span buckets
  24. // for successful and failed spans for a particular span name.
  25. type BucketConfiguration struct {
  26. Name string
  27. MaxRequestsSucceeded int
  28. MaxRequestsErrors int
  29. }
  30. // PerMethodSummary is a summary of the spans stored for a single span name.
  31. type PerMethodSummary struct {
  32. Active int
  33. LatencyBuckets []LatencyBucketSummary
  34. ErrorBuckets []ErrorBucketSummary
  35. }
  36. // LatencyBucketSummary is a summary of a latency bucket.
  37. type LatencyBucketSummary struct {
  38. MinLatency, MaxLatency time.Duration
  39. Size int
  40. }
  41. // ErrorBucketSummary is a summary of an error bucket.
  42. type ErrorBucketSummary struct {
  43. ErrorCode int32
  44. Size int
  45. }