Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: open-telemetry/opentelemetry-collector
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.45.0
Choose a base ref
...
head repository: open-telemetry/opentelemetry-collector
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.46.0
Choose a head ref

Commits on Feb 16, 2022

  1. Update status to be reported by GA not by circle CI (#4864)

    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 16, 2022
    Copy the full SHA
    4920dc3 View commit details
  2. [docs] fix inconsistency in TLS docs (#4866)

    The otlpexporter and otlphttpexporter README files contained duplicate information about TLS configuration, some of which was incorrect.
    
    Fix #4829
    Alex Boten authored Feb 16, 2022
    Copy the full SHA
    26e62ce View commit details
  3. fix: add basic validation in otlphttpexporter (#4860)

    * fix: add basic validation in otlphttpexporter
    
    * chore: add to changelog
    
    * fix: split testfile into good and bad config
    
    Co-authored-by: Alex Boten <aboten@lightstep.com>
    Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
    3 people authored Feb 16, 2022
    Copy the full SHA
    ec3384d View commit details
  4. [confighttp] Allow CORS requests with configured auth (#4869)

    * fix(confighttp): allow CORS requests with configured auth
    
    * add changelog entry
    svrakitin authored Feb 16, 2022
    Copy the full SHA
    fe42d33 View commit details

Commits on Feb 17, 2022

  1. Add tests for expandNilStructPointersFunc, left TODO to investigate (#…

    …4880)
    
    * Add tests for expandNilStructPointersFunc, left TODO to investigate
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    
    * Update config/configmap_test.go
    
    Co-authored-by: Alex Boten <alex@boten.ca>
    bogdandrutu and codeboten authored Feb 17, 2022
    Copy the full SHA
    8d1db96 View commit details
  2. Set Collector Log in New to avoid Shutdown panic (#4827)

    * Set collector logger to Nop on initialization to ensure Shutdown will not panic if called before logger init
    
    Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
    
    * Updated changelog
    
    Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
    cpheps authored Feb 17, 2022
    Copy the full SHA
    2a2a722 View commit details

Commits on Feb 18, 2022

  1. Copy the full SHA
    d5656d6 View commit details
  2. Add the StartFunc/ShutdownFunc to component directly (#4803)

    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 18, 2022
    Copy the full SHA
    c4134ba View commit details
  3. Fix small nits in testutil, handle errors, initialize slices (#4845)

    * Fix small nits in testutil, handle errors, initialize slices
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    
    * Update testutil.go
    bogdandrutu authored Feb 18, 2022
    Copy the full SHA
    70271f2 View commit details

Commits on Feb 19, 2022

  1. Move everything from extensionhelper to component. (#4805)

    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 19, 2022
    Copy the full SHA
    89e0d42 View commit details

Commits on Feb 21, 2022

  1. Bump github.com/golangci/golangci-lint in /internal/tools (#4894)

    Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.44.0 to 1.44.2.
    - [Release notes](https://github.com/golangci/golangci-lint/releases)
    - [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
    - [Commits](golangci/golangci-lint@v1.44.0...v1.44.2)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/golangci/golangci-lint
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 21, 2022
    Copy the full SHA
    c91a7e7 View commit details
  2. make gotidy (#4892)

    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 21, 2022
    Copy the full SHA
    36f11e0 View commit details

Commits on Feb 22, 2022

  1. Dependabot updates, Monday Feb 21 (#4900)

    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 22, 2022
    Copy the full SHA
    e9d6602 View commit details
  2. Move tests for deprecated extensionhelper to component (#4890)

    Followup (forgot to do it) after #4805
    
    Updates #4681
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 22, 2022
    Copy the full SHA
    8bcb5f0 View commit details
  3. Create a new github job, extract all non lint checks (#4888)

    * Create a new github job, extract all non lint checks
    
    Separate goporto in a step that checks for changes, since the command change the code.
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    
    * Update Makefile
    
    Co-authored-by: Dmitrii Anoshin <anoshindx@gmail.com>
    
    Co-authored-by: Dmitrii Anoshin <anoshindx@gmail.com>
    Bogdan Drutu and dmitryax authored Feb 22, 2022
    Copy the full SHA
    8fa0a81 View commit details
  4. Add tests for component.Factories constructor helpers (#4904)

    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 22, 2022
    Copy the full SHA
    27f7607 View commit details
  5. Upgrade to github.com/klauspost/compress v1.14.4 (#4905)

    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 22, 2022
    Copy the full SHA
    ec4f704 View commit details
  6. Move everything from processorhelper to component. (#4889)

    Updates #4681
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 22, 2022
    Copy the full SHA
    004dd4d View commit details
  7. Improve release doc (#4881)

    * Improve release doc
    
    Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
    
    * Fix dates for past releases
    
    Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
    
    * Update docs/release.md
    
    Co-authored-by: Alex Boten <alex@boten.ca>
    
    * Replace tag commands for -release with make targets
    
    Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
    
    Co-authored-by: Bogdan Drutu <lazy@splunk.com>
    Co-authored-by: Alex Boten <alex@boten.ca>
    3 people authored Feb 22, 2022
    Copy the full SHA
    95262b5 View commit details
  8. Move everything from exporterhelper to component. (#4899)

    Updates #4681
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 22, 2022
    Copy the full SHA
    83c6ed1 View commit details

Commits on Feb 23, 2022

  1. Move everything from exporterhelper to component. (#4899) (#4891)

    Updates #4681
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 23, 2022
    Copy the full SHA
    c9c2531 View commit details
  2. Tune Makefile, allow running targets in parallel across modules (#4908)

    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 23, 2022
    Copy the full SHA
    89016d2 View commit details
  3. Replace viper with koanf in builder (#4757)

    * replace viper with koanf in builder
    
    Signed-off-by: Ryan Leung <rleungx@gmail.com>
    
    * resolve the conflicts
    
    Signed-off-by: Ryan Leung <rleungx@gmail.com>
    
    * Update go.sum
    
    Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
    Co-authored-by: Bogdan Drutu <lazy@splunk.com>
    3 people authored Feb 23, 2022
    Copy the full SHA
    78e9640 View commit details

Commits on Feb 24, 2022

  1. Remove support for legacy otlp/http port (#4916)

    Fixes: #4565
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 24, 2022
    Copy the full SHA
    3cbba96 View commit details
  2. [processor/memorylimiter] Only drops traces, not logs or metrics

    Signed-off-by: Dani Louca <dlouca@splunk.com>
    
    **Description:** 
    
    This change 062e64f caused the memory limiter to "only" start the `checkMemLimits` routine for the ml instance used by the traces processor . 
    In other words, metrics and logs processor will NOT [drop/refuse](https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/memorylimiterprocessor/memorylimiter.go#L206) data and will pass them down to the next consumer regardless of the current memory pressure as their instance of ml->forcingDrop will not be set.
    
    The simplest solution, is to call start for each processor (metrics, logs, traces) , but this will not be efficient as we'll be running 3 instances of `checkMemLimits`, ie: multiple GC .
    But at the same we need to allow multiple instances, with different configs, example: `memory_limiter/another` and `memory_limiter`
    
    ````
    extensions:
      memory_ballast:
        size_mib: 4
    
    receivers:
      otlp:
        protocols:
          grpc:
          http:
    processors:
      memory_limiter:
        check_interval: 2s
        limit_mib: 10
    
      memory_limiter/another:
        check_interval: 1s
        limit_mib: 100
    exporters:
      logging:
        logLevel: info
    
    service:
      telemetry:
        logs:
          level: "info"
      pipelines:
        metrics:
          receivers: [otlp]
          processors: [memory_limiter]
          exporters: [logging]
        metrics/default:
          receivers: [otlp]
          processors: [memory_limiter]
          exporters: [logging]
        traces:
          receivers: [otlp]
          processors: [memory_limiter/another]
          exporters: [logging]
      extensions: [memory_ballast]
    ````
    
    The fix adds a global map to keep track of the different instance and add ~~sync once~~ mutex for the start and shutdown call, so only the first processor can launch the `checkMemLimits` routine and the last one to call `shutdown` to take it down.
    If shutdown was called and no `checkMemLimits` has started, then we'll return an error message; unit tests were updated to handle this.
    
    
    **Testing:** 
    Tested with above config and using splunk otel instance with valid data.
    Made sure only a single `checkMemLimits` is running when there is a single config for memory-limiter and more than one when we have multiple.
    I also verified that under memory pressure, when we pass the soft limit, all data types, traces, logs and metrics are getting dropped.
    
    One we agree on this solution, I will look into adding more unit test to validate the change
    dloucasfx authored Feb 24, 2022
    Copy the full SHA
    52d6518 View commit details
  3. [README] Add section about Go compatibility (#4903)

    * Add section about Go compatibility.
    
    * Address review comments
    mx-psi authored Feb 24, 2022
    Copy the full SHA
    d21d20b View commit details

Commits on Feb 25, 2022

  1. Remove use of unnecessary internal interface in factory (#4920)

    * Remove use of unnecessary internal interface in factory
    
    This PR does not change the design (which is to not allow external implementation),
    but simplifies the way how this is achieved, now that the helpers are in the same package.
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    
    * Use baseFactory to implement Type() func
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 25, 2022
    Copy the full SHA
    6c1f5e7 View commit details
  2. Remove deprecated funcs in pdata (#4809)

    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 25, 2022
    Copy the full SHA
    7bdb684 View commit details
  3. Fix deprecation notice version for extensionheleper and componenhelper (

    #4921)
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 25, 2022
    Copy the full SHA
    805224d View commit details

Commits on Feb 26, 2022

  1. [Builder]: Remove test that depends on the contrib (#4787)

    The latest is tested by the cmd/otelcorecol which uses the builder to generate the files.
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 26, 2022
    Copy the full SHA
    4998703 View commit details

Commits on Feb 28, 2022

  1. Promote @mx-psi as approver (#4927)

    Fixes #2819
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 28, 2022
    Copy the full SHA
    14b44ac View commit details
  2. Add test to ensure support for enum values by value and by number (#4915

    )
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Feb 28, 2022
    Copy the full SHA
    e1cb0d1 View commit details
  3. Assign release managers to future releases (#4928)

    * Assign release managers to future releases
    
    Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
    jpkrohling authored Feb 28, 2022
    Copy the full SHA
    67527b4 View commit details

Commits on Mar 1, 2022

  1. Try to add all previous triagers/approvers/maintainers as emeritus (#…

    …4932)
    
    I am sorry if I missed anyone, feel free to ping this PR or open a new PR if you remember others.
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Mar 1, 2022
    Copy the full SHA
    5d0a8dd View commit details
  2. Fix small nits in pdata tests, add missing compatibility tests (#4931)

    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Mar 1, 2022
    Copy the full SHA
    4493a5e View commit details
  3. Reword exceptions section to be more general (#4925)

    * Reword exceptions section to be more general
    
    Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
    Co-authored-by: Bogdan Drutu <lazy@splunk.com>
    3 people authored Mar 1, 2022
    Copy the full SHA
    251ad79 View commit details
  4. Remove deprecated Retrieve funcs/calls (#4922)

    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Mar 1, 2022
    Copy the full SHA
    d5f6bfe View commit details
  5. Bump github.com/magiconair/properties to v1.8.6 (#4935)

    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Mar 1, 2022
    Copy the full SHA
    73a30a6 View commit details
  6. Add feature flag to allow enabling otel for internal metrics (#4912)

    * Add feature flag to allow enabling otel for internal metrics
    
    * Add changelog; mark existing constant deprecated; keep feature flag private
    
    * Register feature flag in telemetry instead
    
    * apply the feature flag back to original value in test
    
    * change comment
    
    * Update service/telemetry.go
    
    update description with suggested change
    
    Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
    
    * Remove use of deprecated variable to address lint issue
    
    * re-arrange import
    
    * Fix unit test
    
    * Re-enable the default value to be configtelemetry.UseOpenTelemetryForInternalMetrics
    
    Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
    Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
    Co-authored-by: Bogdan Drutu <lazy@splunk.com>
    4 people authored Mar 1, 2022
    Copy the full SHA
    f2c295b View commit details

Commits on Mar 2, 2022

  1. Remove deprecated NewConfigProvider funcs (#4937)

    This PR does not add the new versions of the `NewConfigProvider` since we are still designing/reviewing that change.
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Mar 2, 2022
    Copy the full SHA
    5f2d874 View commit details
  2. Resolved race condition in collector when calling Shutdown (#4878)

    * Refactored collector shutdown pattern to remove race condition
    
    Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
    
    * Updated changelog
    
    Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
    
    * Remove Created state from collector to make shutdown behave more in line with language standards
    
    Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
    
    * Removed log from shutdown recover that caused race condition
    
    Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
    
    * Added lint ignore for shutdown recover
    
    Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
    Corbin Phelps authored Mar 2, 2022
    Copy the full SHA
    02d0fe5 View commit details
  3. Add MoveTo all the top pdata structs, consistency with other generate…

    …d structs (#4930)
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    bogdandrutu authored Mar 2, 2022
    Copy the full SHA
    0698727 View commit details
  4. Implement Stringer for service.State (#4938)

    * Implement Stringer for service.State
    
    Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
    
    * Update collector.go
    bogdandrutu authored Mar 2, 2022
    Copy the full SHA
    0c85cfb View commit details
  5. Release prep for v0.46.0 (#4945)

    * Update CHANGELOG and versions.yaml for 0.46.0 release
    
    Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
    Aneurysm9 authored Mar 2, 2022
    Copy the full SHA
    0c99b50 View commit details
Showing with 1,954 additions and 1,838 deletions.
  1. +44 −5 .github/workflows/build-and-test.yml
  2. +54 −0 CHANGELOG.md
  3. +9 −8 CONTRIBUTING.md
  4. +27 −31 Makefile
  5. +12 −3 Makefile.Common
  6. +33 −2 README.md
  7. +3 −10 cmd/builder/go.mod
  8. +58 −9 cmd/builder/go.sum
  9. +6 −3 cmd/builder/internal/builder/config.go
  10. +25 −25 cmd/builder/internal/command.go
  11. +1 −1 cmd/builder/test/README.md
  12. +0 −22 cmd/builder/test/replaces.builder.yaml
  13. +0 −36 cmd/builder/test/replaces.otel.yaml
  14. +1 −1 cmd/builder/test/test.sh
  15. +10 −10 cmd/otelcorecol/builder-config.yaml
  16. +10 −10 cmd/otelcorecol/go.mod
  17. +16 −21 cmd/otelcorecol/go.sum
  18. +1 −1 cmd/otelcorecol/main.go
  19. +34 −2 component/component.go
  20. +3 −3 internal/internalinterface/internalinterface_test.go → component/component_test.go
  21. +8 −26 component/componenthelper/component.go
  22. +3 −3 component/componenttest/nop_component.go
  23. +14 −38 component/componenttest/nop_exporter.go
  24. +10 −28 component/componenttest/nop_extension.go
  25. +15 −41 component/componenttest/nop_processor.go
  26. +14 −41 component/componenttest/nop_receiver.go
  27. +91 −9 component/exporter.go
  28. +43 −38 component/exporter_test.go
  29. +35 −5 component/extension.go
  30. +15 −33 extension/extensionhelper/factory_test.go → component/extension_test.go
  31. +174 −0 component/factories_test.go
  32. +102 −5 component/processor.go
  33. +44 −40 component/processor_test.go
  34. +102 −3 component/receiver.go
  35. +44 −38 component/receiver_test.go
  36. +4 −5 config/configauth/default_serverauthenticator.go
  37. +14 −11 config/confighttp/confighttp.go
  38. +35 −1 config/confighttp/confighttp_test.go
  39. +57 −0 config/configmap_test.go
  40. +1 −4 config/configmapprovider/env_test.go
  41. +1 −2 config/configmapprovider/expand_test.go
  42. +2 −8 config/configmapprovider/file_test.go
  43. +0 −9 config/configmapprovider/provider.go
  44. +0 −72 config/configmapprovider/retrieved.go
  45. +0 −60 config/configmapprovider/retrieved_test.go
  46. +2 −0 config/configtelemetry/configtelemetry.go
  47. +2 −2 config/configunmarshaler/defaultunmarshaler.go
  48. +78 −20 docs/release.md
  49. +12 −10 exporter/exporterhelper/common.go
  50. +2 −2 exporter/exporterhelper/common_test.go
  51. +18 −100 exporter/exporterhelper/factory.go
  52. +0 −96 exporter/exporterhelper/factory_test.go
  53. +2 −2 exporter/exporterhelper/logs_test.go
  54. +2 −2 exporter/exporterhelper/metrics_test.go
  55. +5 −2 exporter/exporterhelper/queued_retry.go
  56. +5 −2 exporter/exporterhelper/queued_retry_experimental.go
  57. +5 −2 exporter/exporterhelper/queued_retry_inmemory.go
  58. +23 −23 exporter/exporterhelper/queued_retry_test.go
  59. +2 −2 exporter/exporterhelper/traces_test.go
  60. +4 −5 exporter/loggingexporter/factory.go
  61. +1 −13 exporter/otlpexporter/README.md
  62. +7 −7 exporter/otlpexporter/factory.go
  63. +3 −3 exporter/otlpexporter/factory_test.go
  64. +1 −6 exporter/otlphttpexporter/README.md
  65. +5 −0 exporter/otlphttpexporter/config.go
  66. +10 −3 exporter/otlphttpexporter/config_test.go
  67. +6 −6 exporter/otlphttpexporter/factory.go
  68. +15 −0 exporter/otlphttpexporter/testdata/bad_empty_config.yaml
  69. +1 −2 exporter/otlphttpexporter/testdata/config.yaml
  70. +1 −5 extension/ballastextension/factory.go
  71. +10 −46 extension/extensionhelper/factory.go
  72. +1 −5 extension/zpagesextension/factory.go
  73. +9 −10 go.mod
  74. +17 −22 go.sum
  75. +0 −30 internal/internalinterface/internalinterface.go
  76. +7 −20 internal/testcomponents/example_exporter.go
  77. +1 −2 internal/testcomponents/example_extension.go
  78. +5 −5 internal/testcomponents/example_factories.go
  79. +4 −5 internal/testcomponents/example_processor.go
  80. +5 −6 internal/testcomponents/example_receiver.go
  81. +5 −2 internal/testutil/testutil.go
  82. +4 −1 internal/testutil/testutil_test.go
  83. +12 −11 internal/tools/go.mod
  84. +26 −24 internal/tools/go.sum
  85. +7 −13 model/pdata/logs.go
  86. +56 −11 model/pdata/logs_test.go
  87. +7 −0 model/pdata/metrics.go
  88. +12 −3 model/pdata/metrics_test.go
  89. +7 −0 model/pdata/traces.go
  90. +23 −14 model/pdata/traces_test.go
  91. +4 −5 processor/batchprocessor/factory.go
  92. +49 −17 processor/memorylimiterprocessor/factory.go
  93. +18 −2 processor/memorylimiterprocessor/factory_test.go
  94. +26 −9 processor/memorylimiterprocessor/memorylimiter.go
  95. +1 −0 processor/memorylimiterprocessor/memorylimiter_test.go
  96. +18 −106 processor/processorhelper/factory.go
  97. +0 −81 processor/processorhelper/factory_test.go
  98. +2 −3 processor/processorhelper/logs.go
  99. +1 −1 processor/processorhelper/logs_test.go
  100. +2 −3 processor/processorhelper/metrics.go
  101. +1 −1 processor/processorhelper/metrics_test.go
  102. +5 −5 processor/processorhelper/processor.go
  103. +2 −3 processor/processorhelper/traces.go
  104. +1 −1 processor/processorhelper/traces_test.go
  105. +4 −6 receiver/otlpreceiver/factory.go
  106. +0 −16 receiver/otlpreceiver/otlp.go
  107. +34 −46 receiver/otlpreceiver/otlp_test.go
  108. +18 −104 receiver/receiverhelper/factory.go
  109. +0 −81 receiver/receiverhelper/factory_test.go
  110. +4 −5 receiver/scraperhelper/scraper.go
  111. +5 −2 receiver/scraperhelper/scrapercontroller.go
  112. +2 −2 receiver/scraperhelper/scrapercontroller_test.go
  113. +26 −7 service/collector.go
  114. +91 −4 service/collector_test.go
  115. +1 −1 service/collector_windows_test.go
  116. +12 −21 service/command_test.go
  117. +1 −27 service/config_provider.go
  118. +3 −6 service/internal/builder/factories_test.go
  119. +2 −3 service/internal/extensions/extensions_test.go
  120. +15 −1 service/telemetry.go
  121. +1 −1 versions.yaml
49 changes: 44 additions & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -64,12 +64,51 @@ jobs:
with:
path: /home/runner/go/bin
key: tools-${{ runner.os }}-${{ hashFiles('./internal/tools/go.mod', './cmd/mdatagen/go.mod', './cmd/mdatagen/*.go') }}
- name: Lint
run: make -j5 checklicense misspell checkdoc goimpi golint goporto
- name: Gen Metadata
- name: golint
run: make -j2 golint
- name: goimpi
run: make goimpi

checks:
runs-on: ubuntu-latest
needs: [setup-environment]
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2.2.0
with:
go-version: 1.17
- name: Setup Go Environment
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Cache Go
id: module-cache
uses: actions/cache@v2
with:
path: /home/runner/go/pkg/mod
key: go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Cache Tools
id: tool-cache
uses: actions/cache@v2
with:
path: /home/runner/go/bin
key: tools-${{ runner.os }}-${{ hashFiles('./internal/tools/go.mod', './cmd/mdatagen/go.mod', './cmd/mdatagen/*.go') }}
- name: checklicense
run: make checklicense
- name: misspell
run: make misspell
- name: checkdoc
run: make checkdoc
- name: go:porto
run: |
make goporto
git diff --exit-code || (echo 'Porto links are out of date, please run "make goporto" and commit the changes in this PR.' && exit 1)
- name: go:generate
run: |
make genmdata
git diff --exit-code || (echo 'Generated code is out of date, please run "make genmdata" and commit the changes in this PR.' && exit 1)
make gogenerate
git diff --exit-code || (echo 'Generated code is out of date, please run "make gogenerate" and commit the changes in this PR.' && exit 1)
- name: Gen Pdata
run: |
make genpdata
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,56 @@

## Unreleased

## v0.46.0 Beta

### 🛑 Breaking changes 🛑

- Deprecated funcs `config.DefaultConfig`, `confighttp.DefaultHTTPSettings`, `exporterhelper.DefaultTimeoutSettings`,
`exporthelper.DefaultQueueSettings`, `exporterhelper.DefaultRetrySettings`, `testcomponents.DefaultFactories`, and
`scraperhelper.DefaultScraperControllerSettings` in favour for their `NewDefault` method to adhere to contribution guidelines (#4865)
- Deprecated funcs `componenthelper.StartFunc`, `componenthelper.ShutdownFunc` in favour of `component.StartFunc` and `component.ShutdownFunc` (#4803)
- Move helpers from extensionhelper to component (#4805)
- Deprecated `extensionhelper.CreateDefaultConfig` in favour of `component.ExtensionDefaultConfigFunc`
- Deprecated `extensionhelper.CreateServiceExtension` in favour of `component.CreateExtensionFunc`
- Deprecated `extensionhelper.NewFactory` in favour of `component.NewExtensionFactory`
- Move helpers from processorhelper to component (#4889)
- Deprecated `processorhelper.CreateDefaultConfig` in favour of `component.ProcessorDefaultConfigFunc`
- Deprecated `processorhelper.WithTraces` in favour of `component.WithTracesProcessor`
- Deprecated `processorhelper.WithMetrics` in favour of `component.WithMetricsProcessor`
- Deprecated `processorhelper.WithLogs` in favour of `component.WithLogsProcessor`
- Deprecated `processorhelper.NewFactory` in favour of `component.NewProcessorFactory`
- Move helpers from exporterhelper to component (#4899)
- Deprecated `exporterhelper.CreateDefaultConfig` in favour of `component.ExporterDefaultConfigFunc`
- Deprecated `exporterhelper.WithTraces` in favour of `component.WithTracesExporter`
- Deprecated `exporterhelper.WithMetrics` in favour of `component.WithMetricsExporter`
- Deprecated `exporterhelper.WithLogs` in favour of `component.WithLogsExporter`
- Deprecated `exporterhelper.NewFactory` in favour of `component.NewExporterFactory`
- Move helpers from receiverhelper to component (#4891)
- Deprecated `receiverhelper.CreateDefaultConfig` in favour of `component.ReceiverDefaultConfigFunc`
- Deprecated `receiverhelper.WithTraces` in favour of `component.WithTracesReceiver`
- Deprecated `receiverhelper.WithMetrics` in favour of `component.WithMetricsReceiver`
- Deprecated `receiverhelper.WithLogs` in favour of `component.WithLogsReceiver`
- Deprecated `receiverhelper.NewFactory` in favour of `component.NewReceiverFactory`
- Change otel collector to enable open telemetry metrics through feature gate instead of a constant
- Remove support for legacy otlp/http port. (#4916)
- Remove deprecated funcs in pdata (#4809)
- Remove deprecated Retrieve funcs/calls (#4922)
- Remove deprecated NewConfigProvider funcs (#4937)

### 💡 Enhancements 💡

- Add validation to check at least one endpoint is specified in otlphttpexporter's configuration (#4860)

## 🧰 Bug fixes 🧰

- Initialized logger with collector to avoid potential race condition panic on `Shutdown` (#4827)
- In addition to traces, now logs and metrics processors will start the memory limiter.
Added thread-safe logic so only the first processor can launch the `checkMemLimits` go-routine and the last processor
that calls shutdown to terminate it; this is done per memory limiter instance.
Added memory limiter factory to cache initiated object and be reused by similar config. This guarantees a single
running `checkMemLimits` per config (#4886)
- Resolved race condition in collector when calling `Shutdown` (#4878)

## v0.45.0 Beta

### 🛑 Breaking changes 🛑
@@ -17,6 +67,10 @@
- Added feature gate summary to zpages extension (#4834)
- Add support for reloading TLS certificates (#4737)

### 🧰 Bug fixes 🧰

- `confighttp`: Allow CORS requests with configured auth (#4869)

### 🚩 Deprecations 🚩

- Deprecate `pdata.NumberDataPoint.Type()` and `pdata.Exemplar.Type()` in favor of `NumberDataPoint.ValueType()` and
17 changes: 9 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -457,14 +457,6 @@ that each of the following steps is done in a separate version:
1. On `v0.N+2`, we change `func GetFoo() Foo` to `func GetFoo(context.Context) Foo` if desired or remove it entirely if
needed.
#### Exceptions
While the above is what we strive to follow, we acknowledge that some changes might be unfeasible to achieve in a
non-breaking manner. Exceptions to the outlined rules are acceptable if consensus can be obtained from approvers in the
pull request they are proposed. A reason for requesting the exception MUST be given in the pull request. Until unanimity
is obtained, approvers and maintainers are encouraged to discuss the issue at hand. If a consensus (unanimity) cannot be
obtained, the maintainers are then tasked in getting a decision using its regular means (voting, TC help, ...).
## Updating Changelog
An entry into the [Changelog](./CHANGELOG.md) is required for the following reasons:
@@ -502,3 +494,12 @@ go: github.com/golangci/golangci-lint@v1.31.0 requires
`go env GOPROXY` should return `https://proxy.golang.org,direct`. If it does not, set it as an environment variable:

`export GOPROXY=https://proxy.golang.org,direct`

## Exceptions

While the rules in this and other documents in this repository is what we strive to follow, we acknowledge that rules may be
unfeasible to be applied in some situations. Exceptions to the rules
on this and other documents are acceptable if consensus can be obtained from approvers in the pull request they are proposed.
A reason for requesting the exception MUST be given in the pull request. Until unanimity is obtained, approvers and maintainers are
encouraged to discuss the issue at hand. If a consensus (unanimity) cannot be obtained, the maintainers are then tasked in getting a
decision using its regular means (voting, TC help, ...).
58 changes: 27 additions & 31 deletions Makefile
Original file line number Diff line number Diff line change
@@ -56,41 +56,44 @@ all-modules:

.PHONY: gomoddownload
gomoddownload:
@$(MAKE) for-all CMD="$(GOCMD) mod download"
@$(MAKE) for-all-target TARGET="moddownload"

.PHONY: gotest
gotest:
@$(MAKE) for-all CMD="make test test-unstable"
@$(MAKE) for-all-target TARGET="test test-unstable"

.PHONY: gobenchmark
gobenchmark:
@$(MAKE) for-all CMD="make benchmark"
@$(MAKE) for-all-target TARGET="benchmark"

.PHONY: gotest-with-cover
gotest-with-cover:
@$(MAKE) for-all CMD="make test-with-cover"
@$(MAKE) for-all-target TARGET="test-with-cover"
$(GOCOVMERGE) $$(find . -name coverage.out) > coverage.txt

.PHONY: goporto
goporto:
@$(MAKE) for-all CMD="make porto"
porto -w --include-internal ./

.PHONY: golint
golint:
@$(MAKE) for-all CMD="make lint lint-unstable"
@$(MAKE) for-all-target TARGET="lint lint-unstable"

.PHONY: goimpi
goimpi:
@$(MAKE) for-all CMD="make impi"
@$(MAKE) for-all-target TARGET="impi"

.PHONY: gofmt
gofmt:
@$(MAKE) for-all CMD="make fmt"
@$(MAKE) for-all-target TARGET="fmt"

.PHONY: gotidy
gotidy:
$(MAKE) for-all CMD="rm -fr go.sum"
$(MAKE) for-all CMD="$(GOCMD) mod tidy -compat=1.17"
@$(MAKE) for-all-target TARGET="tidy"

.PHONY: gogenerate
gogenerate:
@$(MAKE) for-all-target TARGET="generate"

.PHONY: addlicense
addlicense:
@@ -143,15 +146,13 @@ install-tools:
run: otelcorecol
./bin/otelcorecol_$(GOOS)_$(GOARCH) --config ${RUN_CONFIG} ${RUN_ARGS}

.PHONY: for-all
for-all:
@echo "running $${CMD} in root"
@$${CMD}
@set -e; for dir in $(ALL_MODULES); do \
(cd "$${dir}" && \
echo "running $${CMD} in $${dir}" && \
$${CMD} ); \
done
GOMODULES = $(ALL_MODULES) $(PWD)
.PHONY: $(GOMODULES)
MODULEDIRS = $(GOMODULES:%=for-all-target-%)
.PHONY: for-all-target
for-all-target: $(MODULEDIRS)
$(MODULEDIRS):
$(MAKE) -C $(@:for-all-target-%=%) $(TARGET)

.PHONY: check-component
check-component:
@@ -173,10 +174,10 @@ add-tag:
push-tag:
@[ "${TAG}" ] || ( echo ">> env var TAG is not set"; exit 1 )
@echo "Pushing tag ${TAG}"
@git push upstream ${TAG}
@git push git@github.com:open-telemetry/opentelemetry-collector.git ${TAG}
@set -e; for dir in $(ALL_MODULES); do \
(echo Pushing tag "$${dir:2}/$${TAG}" && \
git push upstream "$${dir:2}/$${TAG}"); \
git push git@github.com:open-telemetry/opentelemetry-collector.git "$${dir:2}/$${TAG}"); \
done

.PHONY: delete-tag
@@ -199,10 +200,6 @@ otelcorecol:
genotelcorecol:
pushd cmd/builder/ && $(GOCMD) run ./ --skip-compilation --config ../otelcorecol/builder-config.yaml --output-path ../otelcorecol && popd

.PHONY: genmdata
genmdata:
$(MAKE) for-all CMD="$(GOCMD) generate ./..."

DEPENDABOT_PATH=".github/dependabot.yml"
.PHONY: internal-gendependabot
internal-gendependabot:
@@ -309,13 +306,12 @@ gensemconv:
.PHONY: check-contrib
check-contrib:
@echo Setting contrib at $(CONTRIB_PATH) to use this core checkout
make -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector=$(CURDIR)"
make -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/model=$(CURDIR)/model"
make -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod tidy -go=1.16"
make -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod tidy -go=1.17"
make -C $(CONTRIB_PATH) test
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector=$(CURDIR)"
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/model=$(CURDIR)/model"
@$(MAKE) -C $(CONTRIB_PATH) -j2 gotidy
@$(MAKE) -C $(CONTRIB_PATH) test
@echo Restoring contrib to no longer use this core checkout
make -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector"
@$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector"

# List of directories where certificates are stored for unit tests.
CERT_DIRS := localhost|""|config/configgrpc/testdata \
15 changes: 12 additions & 3 deletions Makefile.Common
Original file line number Diff line number Diff line change
@@ -31,6 +31,11 @@ fmt:
gofmt -w -s ./
goimports -w -local go.opentelemetry.io/collector ./

.PHONY: tidy
tidy:
rm -fr go.sum
$(GOCMD) mod tidy -compat=1.17

.PHONY: lint
lint:
$(LINT) run --allow-parallel-runners
@@ -39,10 +44,14 @@ lint:
lint-unstable:
$(LINT) run --allow-parallel-runners --build-tags enable_unstable

.PHONY: porto
porto:
porto -w --include-internal ./
.PHONY: generate
generate:
$(GOCMD) generate ./...

.PHONY: impi
impi:
@$(IMPI) --local go.opentelemetry.io/collector --scheme stdThirdPartyLocal ./...

.PHONY: moddownload
moddownload:
$(GOCMD) mod download
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@
</p>

<p align="center">
<a href="https://goreportcard.com/report/github.com/open-telemetry/opentelemetry-collector">
<img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/open-telemetry/opentelemetry-collector?style=for-the-badge"></a>
<a href="https://github.com/open-telemetry/opentelemetry-collector/actions/workflows/build-and-test.yml">
<img alt="Go Report Card" src="https://github.com/open-telemetry/opentelemetry-collector/actions/workflows/build-and-test.yml/badge.svg?branch=main"></a>
<a href="https://circleci.com/gh/open-telemetry/opentelemetry-collector">
<img alt="Build Status" src="https://img.shields.io/circleci/build/github/open-telemetry/opentelemetry-collector?style=for-the-badge"></a>
<a href="https://codecov.io/gh/open-telemetry/opentelemetry-collector/branch/main/">
@@ -89,6 +89,18 @@ functionality and configuration:

We follow the production maturity level defined [here](https://github.com/open-telemetry/community/blob/47813530864b9fe5a5146f466a58bd2bb94edc72/maturity-matrix.yaml#L31)

### Compatibility

When used as a library, the OpenTelemetry Collector attempts to track the currently supported versions of Go, as [defined by the Go team](https://go.dev/doc/devel/release#policy).
Removing support for an unsupported Go version is not considered a breaking change.

Starting with the release of Go 1.18, support for Go versions on the OpenTelemetry Collector will be updated as follows:

1. The first release after the release of a new Go minor version `N` will add build and tests steps for the new Go minor version.
2. The first release after the release of a new Go minor version `N` will remove support for Go version `N-2`.

Official OpenTelemetry Collector distro binaries may be built with any supported Go version.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md).
@@ -99,18 +111,37 @@ Triagers ([@open-telemetry/collector-triagers](https://github.com/orgs/open-tele
- [Punya Biswal](https://github.com/punya), Google
- [Steve Flanders](https://github.com/flands), Splunk

Emeritus Triagers:

- [Andrew Hsu](https://github.com/andrewhsu), Lightstep

Approvers ([@open-telemetry/collector-approvers](https://github.com/orgs/open-telemetry/teams/collector-approvers)):

- [Anthony Mirabella](https://github.com/Aneurysm9), AWS
- [Dmitrii Anoshin](https://github.com/dmitryax), Splunk
- [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs
- [Pablo Baeyens](https://github.com/mx-psi), DataDog

Emeritus Approvers:

- [James Bebbington](https://github.com/james-bebbington), Google
- [Jay Camp](https://github.com/jrcamp), Splunk
- [Nail Islamov](https://github.com/nilebox), Google
- [Owais Lone](https://github.com/owais), Splunk
- [Rahul Patel](https://github.com/rghetia), Google
- [Steven Karis](https://github.com/sjkaris), Splunk
- [Yang Song](https://github.com/songy23), Google

Maintainers ([@open-telemetry/collector-maintainers](https://github.com/orgs/open-telemetry/teams/collector-maintainers)):

- [Alex Boten](https://github.com/codeboten), Lightstep
- [Bogdan Drutu](https://github.com/BogdanDrutu), Splunk
- [Tigran Najaryan](https://github.com/tigrannajaryan), Splunk

Emeritus Maintainers:

- [Paulo Janotti](https://github.com/pjanotti), Splunk

Learn more about roles in the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md).

Thanks to all the people who already contributed!
Loading