Go microservice tutorial project using Domain Driven Design and Hexagonal Architecture!

Overview

"ToDo API" Microservice Example

Introduction

Welcome! đź‘‹

This is an educational repository that includes a microservice written in Go. It is used as the principal example of my video series: Building Microservices in Go.

It's a collection of patterns and guidelines I've successfully used to deliver enterprise microservices when using Go.

The whole purpose of this project is to give you an idea about structuring your Go project with 3 principal goals:

  1. It is enterprise, meant to last for years,
  2. It allows a team to collaborate efficiently with little friction, and
  3. It is as idiomatic as possible.

Join the fun at https://youtube.com/MarioCarrion.

Domain Driven Design

This project uses a lot of the ideas introduced by Eric Evans in his book Domain Driven Design, I do encourage reading that book but before I think reading Domain-Driven Design Distilled makes more sense, also there's a free to download DDD Reference available as well.

On YouTube I created a playlist that includes some of my favorite talks and webinars, feel free to explore that as well.

Project Structure

Talking specifically about microservices only, the structure I like to recommended is the following, everything using < and > depends on the domain being implemented and the bounded context being defined.

  • build/: defines the code used for creating infrastructure.
    • /: define concrete cloud provider.
    • /: contains a Dockerfile used for building the binary.
  • cmd/
    • /: uses primary database.
    • /: uses readonly databases.
    • /
  • db/
    • migrations/: contains database migrations.
    • seeds/: contains file meant to populate basic database values.
  • internal/: defines the core domain.
    • /: a concrete repository used by the domain, for example postgresql
    • http/: defines HTTP Handlers.
    • service/: orchestrates use cases and manages transactions.
  • pkg/ public API meant to be imported by other Go package.

There are cases where requiring a new bounded context is needed, in those cases the recommendation would be to define a package like internal/ that then should follow the same structure, for example:

  • internal//
    • internal//
    • internal//http
    • internal//service

Tools

go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/[email protected]
go install github.com/kyleconroy/sqlc/cmd/[email protected]
go install github.com/maxbrunsfeld/counterfeiter/[email protected]
go install github.com/deepmap/oapi-codegen/cmd/[email protected]

Features

Icons meaning:

  • YouTube video means a link to Youtube video.
  • Blog post means a link to Blog post.

In no particular order:

More ideas

Docker Containers

Please notice in order to run this project locally you need to run a few programs in advance, if you use Docker please refer to the concrete instructions in docs/ for more details.

There's also a docker-compose.yml, covered in Building Microservices In Go: Containerization with Docker, however like I mentioned in the video you have to execute docker-compose in three steps:

  1. Run docker-compose up, here the api service will fail because the postgres service takes longer to start.
  2. Run docker-compose up api, api will successfully start however interacting with it will fail because the database migrations are missing.
  3. Run docker-compose run api migrate -path /api/migrations/ -database postgres://user:password@postgres:5432/dbname?sslmode=disable up to finally have everything working correctly.
Comments
  • build(deps): bump go.opentelemetry.io/otel/exporters/prometheus from 0.26.0 to 0.33.0

    build(deps): bump go.opentelemetry.io/otel/exporters/prometheus from 0.26.0 to 0.33.0

    Bumps go.opentelemetry.io/otel/exporters/prometheus from 0.26.0 to 0.33.0.

    Changelog

    Sourced from go.opentelemetry.io/otel/exporters/prometheus's changelog.

    [1.11.1/0.33.0] 2022-10-19

    Added

    • The Prometheus exporter in go.opentelemetry.io/otel/exporters/prometheus registers with a Prometheus registerer on creation. By default, it will register with the default Prometheus registerer. A non-default registerer can be used by passing the WithRegisterer option. (#3239)
    • Added the WithAggregationSelector option to the go.opentelemetry.io/otel/exporters/prometheus package to change the default AggregationSelector used. (#3341)
    • The Prometheus exporter in go.opentelemetry.io/otel/exporters/prometheus converts the Resource associated with metric exports into a target_info metric. (#3285)

    Changed

    • The "go.opentelemetry.io/otel/exporters/prometheus".New function is updated to return an error. It will return an error if the exporter fails to register with Prometheus. (#3239)

    Fixed

    • The URL-encoded values from the OTEL_RESOURCE_ATTRIBUTES environment variable are decoded. (#2963)
    • The baggage.NewMember function decodes the value parameter instead of directly using it. This fixes the implementation to be compliant with the W3C specification. (#3226)
    • Slice attributes of the attribute package are now comparable based on their value, not instance. (#3108 #3252)
    • The Shutdown and ForceFlush methods of the "go.opentelemetry.io/otel/sdk/trace".TraceProvider no longer return an error when no processor is registered. (#3268)
    • The Prometheus exporter in go.opentelemetry.io/otel/exporters/prometheus cumulatively sums histogram buckets. (#3281)
    • The sum of each histogram data point is now uniquely exported by the go.opentelemetry.io/otel/exporters/otlpmetric exporters. (#3284, #3293)
    • Recorded values for asynchronous counters (Counter and UpDownCounter) are interpreted as exact, not incremental, sum values by the metric SDK. (#3350, #3278)
    • UpDownCounters are now correctly output as Prometheus gauges in the go.opentelemetry.io/otel/exporters/prometheus exporter. (#3358)
    • The Prometheus exporter in go.opentelemetry.io/otel/exporters/prometheus no longer describes the metrics it will send to Prometheus on startup. Instead the exporter is defined as an "unchecked" collector for Prometheus. This fixes the reader is not registered warning currently emitted on startup. (#3291 #3342)
    • The go.opentelemetry.io/otel/exporters/prometheus exporter now correctly adds _total suffixes to counter metrics. (#3360)
    • The go.opentelemetry.io/otel/exporters/prometheus exporter now adds a unit suffix to metric names. This can be disabled using the WithoutUnits() option added to that package. (#3352)

    [1.11.0/0.32.3] 2022-10-12

    Added

    • Add default User-Agent header to OTLP exporter requests (go.opentelemetry.io/otel/exporters/otlptrace/otlptracegrpc and go.opentelemetry.io/otel/exporters/otlptrace/otlptracehttp). (#3261)

    Changed

    • span.SetStatus has been updated such that calls that lower the status are now no-ops. (#3214)
    • Upgrade golang.org/x/sys/unix from v0.0.0-20210423185535-09eb48e85fd7 to v0.0.0-20220919091848-fb04ddd9f9c8. This addresses GO-2022-0493. (#3235)

    [0.32.2] Metric SDK (Alpha) - 2022-10-11

    Added

    • Added an example of using metric views to customize instruments. (#3177)

    ... (truncated)

    Commits
    • 2fe8861 Release v1.11.1/v0.33.0 (#3367)
    • 510910e Add unit suffixes to prometheus metric names (#3352)
    • 1d9d4b2 add _total suffixes to prometheus counters (#3360)
    • 715631d Fix Asynchronous Counters Recording (#3350)
    • 2d02a2f converts Resource into a target_info metric on the prometheus exporter (#...
    • 05aca23 Decode values from OTEL_RESOURCE_ATTRIBUTES (#2963)
    • 430f558 Convert UpDownCounters to Prometheus gauges (#3358)
    • 6c0a7c4 Fix getting-started.md with the correct import packages in main.go (#3354)
    • ad45631 Bump github.com/itchyny/gojq from 0.12.7 to 0.12.9 in /internal/tools (#3303)
    • 537660e Bump lycheeverse/lychee-action from 1.4.1 to 1.5.1 (#3301)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 4
  • build(deps): bump go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux from 0.28.0 to 0.32.0

    build(deps): bump go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux from 0.28.0 to 0.32.0

    Bumps go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux from 0.28.0 to 0.32.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 4
  • build(deps): bump go.opentelemetry.io/otel/trace from 1.4.0 to 1.4.1

    build(deps): bump go.opentelemetry.io/otel/trace from 1.4.0 to 1.4.1

    Bumps go.opentelemetry.io/otel/trace from 1.4.0 to 1.4.1.

    Release notes

    Sourced from go.opentelemetry.io/otel/trace's releases.

    Release v1.4.1

    Fixed

    • Fix race condition in reading the dropped spans number for the BatchSpanProcessor. (#2615)
    Changelog

    Sourced from go.opentelemetry.io/otel/trace's changelog.

    [1.4.1] - 2022-02-16

    Fixed

    • Fix race condition in reading the dropped spans number for the BatchSpanProcessor. (#2615)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 4
  • Bump github.com/go-redis/redis/v8 from 8.11.3 to 8.11.4

    Bump github.com/go-redis/redis/v8 from 8.11.3 to 8.11.4

    Bumps github.com/go-redis/redis/v8 from 8.11.3 to 8.11.4.

    Release notes

    Sourced from github.com/go-redis/redis/v8's releases.

    v8.11.4

    Please refer to CHANGELOG.md for details

    Changelog

    Sourced from github.com/go-redis/redis/v8's changelog.

    8.11.4 (2021-10-04)

    Features

    • add acl auth support for sentinels (f66582f)
    • add Cmd.{String,Int,Float,Bool}Slice helpers and an example (5d3d293)
    • add SetVal method for each command (168981d)

    v8.11

    • Remove OpenTelemetry metrics.
    • Supports more redis commands and options.

    v8.10

    • Removed extra OpenTelemetry spans from go-redis core. Now go-redis instrumentation only adds a single span with a Redis command (instead of 4 spans). There are multiple reasons behind this decision:

      • Traces become smaller and less noisy.
      • It may be costly to process those 3 extra spans for each query.
      • go-redis no longer depends on OpenTelemetry.

      Eventually we hope to replace the information that we no longer collect with OpenTelemetry Metrics.

    v8.9

    • Changed PubSub.Channel to only rely on Ping result. You can now use WithChannelSize, WithChannelHealthCheckInterval, and WithChannelSendTimeout to override default settings.

    v8.8

    • To make updating easier, extra modules now have the same version as go-redis does. That means that you need to update your imports:
    github.com/go-redis/redis/extra/redisotel -> github.com/go-redis/redis/extra/redisotel/v8
    github.com/go-redis/redis/extra/rediscensus -> github.com/go-redis/redis/extra/rediscensus/v8
    

    v8.5

    • knadh contributed long-awaited ability to scan Redis Hash into a struct:
    </tr></table> 
    

    ... (truncated)

    Commits
    • fa51524 Merge pull request #1917 from go-redis/release/v8.11.4
    • 0457d0a chore: release v8.11.4 (release.sh)
    • 6dcfc56 chore: use conv commit message
    • 86258a1 chore: lazy reload when moved or ask
    • 98bb99d Fix Redis Cluster issue during roll outs of new nodes with same addr (#1914)
    • 5072031 chore: add Lua scripting example
    • 739c188 chore: tweak GH actions to run all jobs
    • cc09f96 Merge pull request #1909 from go-redis/feature/slice-helpers
    • 5d3d293 feat: add Cmd.{String,Int,Float,Bool}Slice helpers and an example
    • 329d87f Merge pull request #1906 from Stavrospanakakis/master
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 4
  • Bump github.com/joho/godotenv from 1.3.0 to 1.4.0

    Bump github.com/joho/godotenv from 1.3.0 to 1.4.0

    Bumps github.com/joho/godotenv from 1.3.0 to 1.4.0.

    Release notes

    Sourced from github.com/joho/godotenv's releases.

    Housekeeping release

    It's been a long road

    Sorry all, it's been a long time between releases. I have small children now!

    Biggest changes are: #133 Fix missing newline on exported files @​gnarlex #109 Export ints without quotes @​mniak #70 Support keynames starting with export @​hairyhenderson

    I'll try and come back and amend the release with other PR contributors, but thank you to everyone who sent patches in.

    Next release will include multiline variables.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 4
  • Bump go.opentelemetry.io/otel/exporters/metric/prometheus from 0.20.0 to 0.21.0

    Bump go.opentelemetry.io/otel/exporters/metric/prometheus from 0.20.0 to 0.21.0

    Bumps go.opentelemetry.io/otel/exporters/metric/prometheus from 0.20.0 to 0.21.0.

    Changelog

    Sourced from go.opentelemetry.io/otel/exporters/metric/prometheus's changelog.

    [1.0.0-RC1] / 0.21.0 - 2021-06-18

    With this release we are introducing a split in module versions. The tracing API and SDK are entering the v1.0.0 Release Candidate phase with v1.0.0-RC1 while the experimental metrics API and SDK continue with v0.x releases at v0.21.0. Modules at major version 1 or greater will not depend on modules with major version 0.

    Added

    • Adds otlpgrpc.WithRetryoption for configuring the retry policy for transient errors on the otlp/gRPC exporter. (#1832)
      • The following status codes are defined as transient errors:
        gRPC Status Code Description
        1 Cancelled
        4 Deadline Exceeded
        8 Resource Exhausted
        10 Aborted
        10 Out of Range
        14 Unavailable
        15 Data Loss
    • Added Status type to the go.opentelemetry.io/otel/sdk/trace package to represent the status of a span. (#1874)
    • Added SpanStub type and its associated functions to the go.opentelemetry.io/otel/sdk/trace/tracetest package. This type can be used as a testing replacement for the SpanSnapshot that was removed from the go.opentelemetry.io/otel/sdk/trace package. (#1873)
    • Adds support for scheme in OTEL_EXPORTER_OTLP_ENDPOINT according to the spec. (#1886)
    • Adds trace.WithSchemaURL option for configuring the tracer with a Schema URL. (#1889)
    • Added an example of using OpenTelemetry Go as a trace context forwarder. (#1912)
    • ParseTraceState is added to the go.opentelemetry.io/otel/trace package. It can be used to decode a TraceState from a tracestate header string value. (#1937)
    • Added Len method to the TraceState type in the go.opentelemetry.io/otel/trace package. This method returns the number of list-members the TraceState holds. (#1937)
    • Creates package go.opentelemetry.io/otel/exporters/otlp/otlptrace that defines a trace exporter that uses a otlptrace.Client to send data. Creates package go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc implementing a gRPC otlptrace.Client and offers convenience functions, NewExportPipeline and InstallNewPipeline, to setup and install a otlptrace.Exporter in tracing .(#1922)
    • Added Baggage, Member, and Property types to the go.opentelemetry.io/otel/baggage package along with their related functions. (#1967)
    • Added ContextWithBaggage, ContextWithoutBaggage, and FromContext functions to the go.opentelemetry.io/otel/baggage package. These functions replace the Set, Value, ContextWithValue, ContextWithoutValue, and ContextWithEmpty functions from that package and directly work with the new Baggage type. (#1967)
    • The OTEL_SERVICE_NAME environment variable is the preferred source for service.name, used by the environment resource detector if a service name is present both there and in OTEL_RESOURCE_ATTRIBUTES. (#1969)
    • Creates package go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp implementing an HTTP otlptrace.Client and offers convenience functions, NewExportPipeline and InstallNewPipeline, to setup and install a otlptrace.Exporter in tracing. (#1963)
    • Changes go.opentelemetry.io/otel/sdk/resource.NewWithAttributes to require a schema URL. The old function is still available as resource.NewSchemaless. This is a breaking change. (#1938)
    • Several builtin resource detectors now correctly populate the schema URL. (#1938)
    • Creates package go.opentelemetry.io/otel/exporters/otlp/otlpmetric that defines a metrics exporter that uses a otlpmetric.Client to send data.
    • Creates package go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc implementing a gRPC otlpmetric.Client and offers convenience functions, New and NewUnstarted, to create an otlpmetric.Exporter.(#1991)
    • Added go.opentelemetry.io/otel/exporters/stdout/stdouttrace exporter. (#2005)
    • Added go.opentelemetry.io/otel/exporters/stdout/stdoutmetric exporter. (#2005)
    • Added a TracerProvider() method to the "go.opentelemetry.io/otel/trace".Span interface. This can be used to obtain a TracerProvider from a given span that utilizes the same trace processing pipeline. (#2009)

    Changed

    • Make NewSplitDriver from go.opentelemetry.io/otel/exporters/otlp take variadic arguments instead of a SplitConfig item. NewSplitDriver now automatically implements an internal noopDriver for SplitConfig fields that are not initialized. (#1798)
    • resource.New() now creates a Resource without builtin detectors. Previous behavior is now achieved by using WithBuiltinDetectors Option. (#1810)
    • Move the Event type from the go.opentelemetry.io/otel package to the go.opentelemetry.io/otel/sdk/trace package. (#1846)

    ... (truncated)

    Commits
    • ced177b Pre-release 1.0.0-RC1 (#2013)
    • 694c9a4 Interface stability documentation (#2012)
    • 39fe809 Add span.TracerProvider() (#2009)
    • d020e1a Add more tests for go.opentelemetry.io/otel/trace package. (#2004)
    • 6d4a38f replace WithSyncer with WithBatcher in opencensus example (#2007)
    • c30cd1d Split stdout exporter into stdouttrace and stdoutmetric (#2005)
    • 80ca2b1 otlp: mark unix endpoints to work without transport security (#2001)
    • 6514098 Update codecov ignore (#2006)
    • 3be9813 Deprecate the exporters in the "trace" and "metric" sub-directories (#1993)
    • 377f7ce remove WithTrace* options from otlptrace exporters (#1997)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 4
  • build(deps): bump github.com/deepmap/oapi-codegen from 1.12.2 to 1.12.3 in /internal/tools

    build(deps): bump github.com/deepmap/oapi-codegen from 1.12.2 to 1.12.3 in /internal/tools

    Bumps github.com/deepmap/oapi-codegen from 1.12.2 to 1.12.3.

    Release notes

    Sourced from github.com/deepmap/oapi-codegen's releases.

    Fix the generated error handling for Gin

    In v1.12.0 we added support for custom error handling to be used in the generated Gin code.

    Unfortunately, we didn't produce the right code, so this would cause (compilation) errors.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 3
  • build(deps): bump github.com/golangci/golangci-lint from 1.46.2 to 1.47.2 in /internal/tools

    build(deps): bump github.com/golangci/golangci-lint from 1.46.2 to 1.47.2 in /internal/tools

    Bumps github.com/golangci/golangci-lint from 1.46.2 to 1.47.2.

    Release notes

    Sourced from github.com/golangci/golangci-lint's releases.

    v1.47.2

    Changelog

    • 61673b34 revive: ignore slow rules (#2999)

    v1.47.1

    Changelog

    • a91463cd build(deps): bump github.com/daixiang0/gci from 0.4.2 to 0.4.3 (#2992)
    • 4c8bdc70 build(deps): bump github.com/sivchari/tenv from 1.6.0 to 1.7.0 (#2988)
    • 4e60e8a8 gci: fix options display (#2989)
    • fd87bd1e gci: remove the use of stdin (#2984)

    v1.47.0

    Changelog

    • b4154027 Add linter asasalint to lint pass []any as any (#2968)
    • 1d8a15a0 add nosnakecase lint (#2828)
    • 2a1edcef build(deps): bump github.com/Antonboom/errname from 0.1.6 to 0.1.7 (#2888)
    • c766184c build(deps): bump github.com/GaijinEntertainment/go-exhaustruct/v2 from 2.1.0 to 2.2.0 (#2916)
    • b8f1e2a5 build(deps): bump github.com/daixiang0/gci from 0.3.4 to 0.4.0 (#2965)
    • 5e183652 build(deps): bump github.com/daixiang0/gci from 0.4.0 to 0.4.1 (#2973)
    • e60937a1 build(deps): bump github.com/daixiang0/gci from 0.4.1 to 0.4.2 (#2979)
    • 98c811d0 build(deps): bump github.com/firefart/nonamedreturns from 1.0.1 to 1.0.2 (#2929)
    • 023e1c4f build(deps): bump github.com/firefart/nonamedreturns from 1.0.2 to 1.0.4 (#2944)
    • 7fbb11ca build(deps): bump github.com/fzipp/gocyclo from 0.5.1 to 0.6.0 (#2926)
    • db5d58cd build(deps): bump github.com/hashicorp/go-version from 1.4.0 to 1.5.0 (#2873)
    • f75b1a8b build(deps): bump github.com/hashicorp/go-version from 1.5.0 to 1.6.0 (#2958)
    • 75be924e build(deps): bump github.com/kisielk/errcheck from 1.6.0 to 1.6.1 (#2871)
    • 33f4aeeb build(deps): bump github.com/kulti/thelper from 0.6.2 to 0.6.3 (#2872)
    • 6a412d3d build(deps): bump github.com/kunwardeep/paralleltest from 1.0.3 to 1.0.4 (#2907)
    • 97eea6ea build(deps): bump github.com/kunwardeep/paralleltest from 1.0.4 to 1.0.6 (#2918)
    • 3a0f646e build(deps): bump github.com/maratori/testpackage from 1.0.1 to 1.1.0 (#2945)
    • 92d7022d build(deps): bump github.com/nishanths/exhaustive from 0.7.11 to 0.8.1 (#2906)
    • 97d7415b build(deps): bump github.com/quasilyte/go-ruleguard/dsl from 0.3.19 to 0.3.21 (#2874)
    • 0e3730d3 build(deps): bump github.com/securego/gosec/v2 from 2.11.0 to 2.12.0 (#2925)
    • ac99dbcc build(deps): bump github.com/shirou/gopsutil/v3 from 3.22.4 to 3.22.5 (#2908)
    • 8e0a6725 build(deps): bump github.com/shirou/gopsutil/v3 from 3.22.5 to 3.22.6 (#2959)
    • c8e38c4b build(deps): bump github.com/sivchari/tenv from 1.5.0 to 1.6.0 (#2927)
    • f70bf666 build(deps): bump github.com/spf13/cobra from 1.4.0 to 1.5.0 (#2933)
    • 153b4072 build(deps): bump github.com/spf13/viper from 1.11.0 to 1.12.0 (#2889)
    • f03a5207 build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2 (#2917)
    • e33e63ed build(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.4 (#2934)
    • 44e9b34d build(deps): bump github.com/stretchr/testify from 1.7.4 to 1.7.5 (#2942)
    • bb5b6625 build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0 (#2957)
    • 2c30625c build(deps): bump github.com/tomarrell/wrapcheck/v2 from 2.6.1 to 2.6.2 (#2928)
    • 9317da6c build(deps): bump github.com/uudashr/gocognit from 1.0.5 to 1.0.6 (#2962)
    • 3071fecb build(deps): bump gitlab.com/bosi/decorder from 0.2.1 to 0.2.2 (#2943)
    • d92f144d build(deps): bump goreleaser/goreleaser-action from 2 to 3 (#2876)
    • ddee31ae build(deps): bump honnef.co/go/tools from 0.3.1 to 0.3.2 (#2870)
    • 9ebc2d52 build(deps): bump moment from 2.29.2 to 2.29.4 in /.github/contributors (#2966)

    ... (truncated)

    Changelog

    Sourced from github.com/golangci/golangci-lint's changelog.

    v1.47.2

    1. updated linters:
      • revive: ignore slow rules

    v1.47.1

    1. updated linters:
      • gci: from 0.4.2 to 0.4.3
      • gci: remove the use of stdin
      • gci: fix options display
      • tenv: from 1.6.0 to 1.7.0
      • unparam: bump to HEAD

    v1.47.0

    1. new linters:
    2. updated linters:
      • decorder: from 0.2.1 to 0.2.2
      • errcheck: from 1.6.0 to 1.6.1
      • errname: from 0.1.6 to 0.1.7
      • exhaustive: from 0.7.11 to 0.8.1
      • gci: fix issues and re-enable autofix
      • gci: from 0.3.4 to 0.4.2
      • go-exhaustruct: from 2.1.0 to 2.2.0
      • go-ruleguard: from 0.3.19 to 0.3.21
      • gocognit: from 1.0.5 to 1.0.6
      • gocyclo: from 0.5.1 to 0.6.0
      • golang.org/x/tools: bump to HEAD
      • gosec: allow global config
      • gosec: from 2.11.0 to 2.12.0
      • nonamedreturns: from 1.0.1 to 1.0.4
      • paralleltest: from 1.0.3 to 1.0.6
      • staticcheck: fix generics
      • staticcheck: from 0.3.1 to 0.3.2
      • tenv: from 1.5.0 to 1.6.0
      • testpackage: from 1.0.1 to 1.1.0
      • thelper: from 0.6.2 to 0.6.3
      • wrapcheck: from 2.6.1 to 2.6.2
    3. documentation:
      • add thanks page
      • add a clear explanation about the staticcheck integration.
      • depguard: add ignore-file-rules
      • depguard: adjust phrasing
      • gocritic: add enable and disable ruleguard settings
      • gomnd: fix typo
      • gosec: add configs for all existing rules
      • govet: add settings for shadow and unusedresult

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 3
  • build(deps): bump github.com/kyleconroy/sqlc from 1.12.0 to 1.13.0 in /internal/tools

    build(deps): bump github.com/kyleconroy/sqlc from 1.12.0 to 1.13.0 in /internal/tools

    Bumps github.com/kyleconroy/sqlc from 1.12.0 to 1.13.0.

    Release notes

    Sourced from github.com/kyleconroy/sqlc's releases.

    v1.13.0

    What's Changed

    New Contributors

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 3
  • build(deps): bump go.opentelemetry.io/otel/sdk/export/metric from 0.26.0 to 0.28.0

    build(deps): bump go.opentelemetry.io/otel/sdk/export/metric from 0.26.0 to 0.28.0

    Bumps go.opentelemetry.io/otel/sdk/export/metric from 0.26.0 to 0.28.0.

    Changelog

    Sourced from go.opentelemetry.io/otel/sdk/export/metric's changelog.

    [1.6.0/0.28.0] - 2022-03-23

    ⚠️ Notice ⚠️

    This update is a breaking change of the unstable Metrics API. Code instrumented with the go.opentelemetry.io/otel/metric will need to be modified.

    Added

    • Add metrics exponential histogram support. New mapping functions have been made available in sdk/metric/aggregator/exponential/mapping for other OpenTelemetry projects to take dependencies on. (#2502)
    • Add Go 1.18 to our compatibility tests. (#2679)
    • Allow configuring the Sampler with the OTEL_TRACES_SAMPLER and OTEL_TRACES_SAMPLER_ARG environment variables. (#2305, #2517)
    • Add the metric/global for obtaining and setting the global MeterProvider. (#2660)

    Changed

    • The metrics API has been significantly changed to match the revised OpenTelemetry specification. High-level changes include:

      • Synchronous and asynchronous instruments are now handled by independent InstrumentProviders. These InstrumentProviders are managed with a Meter.
      • Synchronous and asynchronous instruments are grouped into their own packages based on value types.
      • Asynchronous callbacks can now be registered with a Meter.

      Be sure to check out the metric module documentation for more information on how to use the revised API. (#2587, #2660)

    Fixed

    • Fallback to general attribute limits when span specific ones are not set in the environment. (#2675, #2677)

    [1.5.0] - 2022-03-16

    Added

    • Log the Exporters configuration in the TracerProviders message. (#2578)

    • Added support to configure the span limits with environment variables. The following environment variables are supported. (#2606, #2637)

      • OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT
      • OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT
      • OTEL_SPAN_EVENT_COUNT_LIMIT
      • OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT
      • OTEL_SPAN_LINK_COUNT_LIMIT
      • OTEL_LINK_ATTRIBUTE_COUNT_LIMIT

      If the provided environment variables are invalid (negative), the default values would be used.

    • Rename the gc runtime name to go (#2560)

    • Add resource container ID detection. (#2418)

    • Add span attribute value length limit. The new AttributeValueLengthLimit field is added to the "go.opentelemetry.io/otel/sdk/trace".SpanLimits type to configure this limit for a TracerProvider.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 3
  • build(deps): bump go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux from 0.28.0 to 0.29.0

    build(deps): bump go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux from 0.28.0 to 0.29.0

    Bumps go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux from 0.28.0 to 0.29.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 3
  • Trying to run kafka sampole using docker on apple m1 macbook

    Trying to run kafka sampole using docker on apple m1 macbook

    I am trying to run docker compose build rest-server

    its throwing following error.

     => ERROR [builder 6/7] RUN CGO_ENABLED=1 GOOS=linux go build -a -installsuffix cgo -ldflags "-extldflags -static" -tags musl       github.com/Ma  23.2s
    ------
     > [builder 6/7] RUN CGO_ENABLED=1 GOOS=linux go build -a -installsuffix cgo -ldflags "-extldflags -static" -tags musl       github.com/MarioCarrion/todo-api/cmd/rest-server:
    #0 22.92 # github.com/MarioCarrion/todo-api/cmd/rest-server
    #0 22.92 /usr/local/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
    #0 22.92 /usr/lib/gcc/aarch64-alpine-linux-musl/12.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/confluentinc/[email protected]/kafka/librdkafka_vendor/librdkafka_musl_linux.a(rdkafka_error.o): Relocations in generic ELF (EM: 62)
    #0 22.92 /usr/lib/gcc/aarch64-alpine-linux-musl/12.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/confluentinc/[email protected]/kafka/librdkafka_vendor/librdkafka_musl_linux.a(rdkafka_error.o): Relocations in generic ELF (EM: 62)
    #0 22.92 /usr/lib/gcc/aarch64-alpine-linux-musl/12.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/confluentinc/[email protected]/kafka/librdkafka_vendor/librdkafka_musl_linux.a: error adding symbols: file in wrong format
    #0 22.92 collect2: error: ld returned 1 exit status
    #0 22.92 
    ------
    failed to solve: executor failed running [/bin/sh -c CGO_ENABLED=1 GOOS=lin
    
    opened by najamsk 1
  • build(deps): bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp from 0.29.0 to 0.37.0

    build(deps): bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp from 0.29.0 to 0.37.0

    Bumps go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp from 0.29.0 to 0.37.0.

    Changelog

    Sourced from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp's changelog.

    [1.12.0/0.37.0/0.6.0]

    Added

    • Implemented retrieving the aws.ecs.* resource attributes in go.opentelemetry.io/detectors/aws/ecs based on the ECS Metadata v4 endpoint. (#2626)
    • The WithLogger option to go.opentelemetry.io/contrib/samplers/jaegerremote to allow users to pass a logr.Logger and have operations logged. (#2566)
    • Add the messaging.url & messaging.system attributes to all appropriate SQS operations in the go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws package. (#2879)
    • Add example use of the metrics signal to go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/example. (#2610)
    • [otelgin] Add support for filters to the go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin package to provide the way to control which inbound requests are traced. (#2965, #2963)

    Fixed

    • Set the status_code span attribute even if the HTTP handler hasn't written anything. (#2822)
    • Do not wrap http.NoBody in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp, which fixes handling of that special request body. (#2983)

    [1.11.1/0.36.4/0.5.2]

    Added

    • Add trace context propagation support to instrumentation/github.com/aws/aws-sdk-go-v2/otelaws (#2856).
    • [otelgrpc] Add WithMeterProvider function to enable metric and add metric rpc.server.duration to otelgrpc instrumentation library. (#2700)

    Changed

    [1.11.0/0.36.3/0.5.1]

    Changed

    [0.36.2]

    Changed

    • Upgrade dependencies of the OpenTelemetry Go Metric SDK to use the new v0.32.2 release
    • Avoid getting a new Tracer for every RPC in go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc. (#2835)
    • Conditionally compute message size for tracing events using proto v2 API rather than legacy v1 API in go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc. (#2647)

    Deprecated

    • The Inject function in go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc is deprecated. (#2838)
    • The Extract function in go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc is deprecated. (#2838)

    [0.36.1]

    Changed

    • Upgrade dependencies of the OpenTelemetry Go Metric SDK to use the new v0.32.1 release

    ... (truncated)

    Commits
    • ad04d9c Release v1.12.0/0.37.0/0.6.0 (#3067)
    • f368cb0 dependabot updates Sun Dec 4 17:47:16 UTC 2022 (#3066)
    • 6172b24 build(deps): bump github.com/aws/aws-sdk-go in /detectors/aws/ec2 (#3043)
    • 99f0a80 dependabot updates Mon Nov 28 19:36:32 UTC 2022 (#3042)
    • 01b39e7 Implement aws.ecs.* resource attributes (#2626)
    • 15ceaa2 dependabot updates Mon Nov 21 15:58:19 UTC 2022 (#3028)
    • 871ebe7 dependabot updates Sun Nov 13 17:55:48 UTC 2022 (#3000)
    • e79577d treat http.NoBody the same as a nil body (#2983)
    • 9a9abd4 Add support for filters to the otelgin package (#2965)
    • 44d8196 [net/http] enhance otelhttp example to support metric (#2610)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 0
  • build(deps): bump go.opentelemetry.io/otel/sdk/metric from 0.26.0 to 0.34.0

    build(deps): bump go.opentelemetry.io/otel/sdk/metric from 0.26.0 to 0.34.0

    Bumps go.opentelemetry.io/otel/sdk/metric from 0.26.0 to 0.34.0.

    Changelog

    Sourced from go.opentelemetry.io/otel/sdk/metric's changelog.

    [1.11.2/0.34.0] 2022-12-05

    Added

    • The WithView Option is added to the go.opentelemetry.io/otel/sdk/metric package. This option is used to configure the view(s) a MeterProvider will use for all Readers that are registered with it. (#3387)
    • Add Instrumentation Scope and Version as info metric and label in Prometheus exporter. This can be disabled using the WithoutScopeInfo() option added to that package.(#3273, #3357)
    • OTLP exporters now recognize: (#3363)
      • OTEL_EXPORTER_OTLP_INSECURE
      • OTEL_EXPORTER_OTLP_TRACES_INSECURE
      • OTEL_EXPORTER_OTLP_METRICS_INSECURE
      • OTEL_EXPORTER_OTLP_CLIENT_KEY
      • OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY
      • OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY
      • OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE
      • OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE
      • OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE
    • The View type and related NewView function to create a view according to the OpenTelemetry specification are added to go.opentelemetry.io/otel/sdk/metric. These additions are replacements for the View type and New function from go.opentelemetry.io/otel/sdk/metric/view. (#3459)
    • The Instrument and InstrumentKind type are added to go.opentelemetry.io/otel/sdk/metric. These additions are replacements for the Instrument and InstrumentKind types from go.opentelemetry.io/otel/sdk/metric/view. (#3459)
    • The Stream type is added to go.opentelemetry.io/otel/sdk/metric to define a metric data stream a view will produce. (#3459)
    • The AssertHasAttributes allows instrument authors to test that datapoints returned have appropriate attributes. (#3487)

    Changed

    • The "go.opentelemetry.io/otel/sdk/metric".WithReader option no longer accepts views to associate with the Reader. Instead, views are now registered directly with the MeterProvider via the new WithView option. The views registered with the MeterProvider apply to all Readers. (#3387)
    • The Temporality(view.InstrumentKind) metricdata.Temporality and Aggregation(view.InstrumentKind) aggregation.Aggregation methods are added to the "go.opentelemetry.io/otel/sdk/metric".Exporter interface. (#3260)
    • The Temporality(view.InstrumentKind) metricdata.Temporality and Aggregation(view.InstrumentKind) aggregation.Aggregation methods are added to the "go.opentelemetry.io/otel/exporters/otlp/otlpmetric".Client interface. (#3260)
    • The WithTemporalitySelector and WithAggregationSelector ReaderOptions have been changed to ManualReaderOptions in the go.opentelemetry.io/otel/sdk/metric package. (#3260)
    • The periodic reader in the go.opentelemetry.io/otel/sdk/metric package now uses the temporality and aggregation selectors from its configured exporter instead of accepting them as options. (#3260)

    Fixed

    • The go.opentelemetry.io/otel/exporters/prometheus exporter fixes duplicated _total suffixes. (#3369)
    • Remove comparable requirement for Readers. (#3387)
    • Cumulative metrics from the OpenCensus bridge (go.opentelemetry.io/otel/bridge/opencensus) are defined as monotonic sums, instead of non-monotonic. (#3389)
    • Asynchronous counters (Counter and UpDownCounter) from the metric SDK now produce delta sums when configured with delta temporality. (#3398)
    • Exported Status codes in the go.opentelemetry.io/otel/exporters/zipkin exporter are now exported as all upper case values. (#3340)
    • Aggregations from go.opentelemetry.io/otel/sdk/metric with no data are not exported. (#3394, #3436)
    • Reenabled Attribute Filters in the Metric SDK. (#3396)
    • Asynchronous callbacks are only called if they are registered with at least one instrument that does not use drop aggragation. (#3408)
    • Do not report empty partial-success responses in the go.opentelemetry.io/otel/exporters/otlp exporters. (#3438, #3432)
    • Handle partial success responses in go.opentelemetry.io/otel/exporters/otlp/otlpmetric exporters. (#3162, #3440)
    • Prevent duplicate Prometheus description, unit, and type. (#3469)
    • Prevents panic when using incorrect attribute.Value.As[Type]Slice(). (#3489)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump go.opentelemetry.io/otel/exporters/prometheus from 0.26.0 to 0.34.0

    build(deps): bump go.opentelemetry.io/otel/exporters/prometheus from 0.26.0 to 0.34.0

    Bumps go.opentelemetry.io/otel/exporters/prometheus from 0.26.0 to 0.34.0.

    Changelog

    Sourced from go.opentelemetry.io/otel/exporters/prometheus's changelog.

    [1.11.2/0.34.0] 2022-12-05

    Added

    • The WithView Option is added to the go.opentelemetry.io/otel/sdk/metric package. This option is used to configure the view(s) a MeterProvider will use for all Readers that are registered with it. (#3387)
    • Add Instrumentation Scope and Version as info metric and label in Prometheus exporter. This can be disabled using the WithoutScopeInfo() option added to that package.(#3273, #3357)
    • OTLP exporters now recognize: (#3363)
      • OTEL_EXPORTER_OTLP_INSECURE
      • OTEL_EXPORTER_OTLP_TRACES_INSECURE
      • OTEL_EXPORTER_OTLP_METRICS_INSECURE
      • OTEL_EXPORTER_OTLP_CLIENT_KEY
      • OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY
      • OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY
      • OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE
      • OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE
      • OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE
    • The View type and related NewView function to create a view according to the OpenTelemetry specification are added to go.opentelemetry.io/otel/sdk/metric. These additions are replacements for the View type and New function from go.opentelemetry.io/otel/sdk/metric/view. (#3459)
    • The Instrument and InstrumentKind type are added to go.opentelemetry.io/otel/sdk/metric. These additions are replacements for the Instrument and InstrumentKind types from go.opentelemetry.io/otel/sdk/metric/view. (#3459)
    • The Stream type is added to go.opentelemetry.io/otel/sdk/metric to define a metric data stream a view will produce. (#3459)
    • The AssertHasAttributes allows instrument authors to test that datapoints returned have appropriate attributes. (#3487)

    Changed

    • The "go.opentelemetry.io/otel/sdk/metric".WithReader option no longer accepts views to associate with the Reader. Instead, views are now registered directly with the MeterProvider via the new WithView option. The views registered with the MeterProvider apply to all Readers. (#3387)
    • The Temporality(view.InstrumentKind) metricdata.Temporality and Aggregation(view.InstrumentKind) aggregation.Aggregation methods are added to the "go.opentelemetry.io/otel/sdk/metric".Exporter interface. (#3260)
    • The Temporality(view.InstrumentKind) metricdata.Temporality and Aggregation(view.InstrumentKind) aggregation.Aggregation methods are added to the "go.opentelemetry.io/otel/exporters/otlp/otlpmetric".Client interface. (#3260)
    • The WithTemporalitySelector and WithAggregationSelector ReaderOptions have been changed to ManualReaderOptions in the go.opentelemetry.io/otel/sdk/metric package. (#3260)
    • The periodic reader in the go.opentelemetry.io/otel/sdk/metric package now uses the temporality and aggregation selectors from its configured exporter instead of accepting them as options. (#3260)

    Fixed

    • The go.opentelemetry.io/otel/exporters/prometheus exporter fixes duplicated _total suffixes. (#3369)
    • Remove comparable requirement for Readers. (#3387)
    • Cumulative metrics from the OpenCensus bridge (go.opentelemetry.io/otel/bridge/opencensus) are defined as monotonic sums, instead of non-monotonic. (#3389)
    • Asynchronous counters (Counter and UpDownCounter) from the metric SDK now produce delta sums when configured with delta temporality. (#3398)
    • Exported Status codes in the go.opentelemetry.io/otel/exporters/zipkin exporter are now exported as all upper case values. (#3340)
    • Aggregations from go.opentelemetry.io/otel/sdk/metric with no data are not exported. (#3394, #3436)
    • Reenabled Attribute Filters in the Metric SDK. (#3396)
    • Asynchronous callbacks are only called if they are registered with at least one instrument that does not use drop aggragation. (#3408)
    • Do not report empty partial-success responses in the go.opentelemetry.io/otel/exporters/otlp exporters. (#3438, #3432)
    • Handle partial success responses in go.opentelemetry.io/otel/exporters/otlp/otlpmetric exporters. (#3162, #3440)
    • Prevent duplicate Prometheus description, unit, and type. (#3469)
    • Prevents panic when using incorrect attribute.Value.As[Type]Slice(). (#3489)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump go.opentelemetry.io/contrib/instrumentation/runtime from 0.27.0 to 0.37.0

    build(deps): bump go.opentelemetry.io/contrib/instrumentation/runtime from 0.27.0 to 0.37.0

    Bumps go.opentelemetry.io/contrib/instrumentation/runtime from 0.27.0 to 0.37.0.

    Changelog

    Sourced from go.opentelemetry.io/contrib/instrumentation/runtime's changelog.

    [1.12.0/0.37.0/0.6.0]

    Added

    • Implemented retrieving the aws.ecs.* resource attributes in go.opentelemetry.io/detectors/aws/ecs based on the ECS Metadata v4 endpoint. (#2626)
    • The WithLogger option to go.opentelemetry.io/contrib/samplers/jaegerremote to allow users to pass a logr.Logger and have operations logged. (#2566)
    • Add the messaging.url & messaging.system attributes to all appropriate SQS operations in the go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws package. (#2879)
    • Add example use of the metrics signal to go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/example. (#2610)
    • [otelgin] Add support for filters to the go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin package to provide the way to control which inbound requests are traced. (#2965, #2963)

    Fixed

    • Set the status_code span attribute even if the HTTP handler hasn't written anything. (#2822)
    • Do not wrap http.NoBody in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp, which fixes handling of that special request body. (#2983)

    [1.11.1/0.36.4/0.5.2]

    Added

    • Add trace context propagation support to instrumentation/github.com/aws/aws-sdk-go-v2/otelaws (#2856).
    • [otelgrpc] Add WithMeterProvider function to enable metric and add metric rpc.server.duration to otelgrpc instrumentation library. (#2700)

    Changed

    [1.11.0/0.36.3/0.5.1]

    Changed

    [0.36.2]

    Changed

    • Upgrade dependencies of the OpenTelemetry Go Metric SDK to use the new v0.32.2 release
    • Avoid getting a new Tracer for every RPC in go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc. (#2835)
    • Conditionally compute message size for tracing events using proto v2 API rather than legacy v1 API in go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc. (#2647)

    Deprecated

    • The Inject function in go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc is deprecated. (#2838)
    • The Extract function in go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc is deprecated. (#2838)

    [0.36.1]

    Changed

    • Upgrade dependencies of the OpenTelemetry Go Metric SDK to use the new v0.32.1 release

    ... (truncated)

    Commits
    • ad04d9c Release v1.12.0/0.37.0/0.6.0 (#3067)
    • f368cb0 dependabot updates Sun Dec 4 17:47:16 UTC 2022 (#3066)
    • 6172b24 build(deps): bump github.com/aws/aws-sdk-go in /detectors/aws/ec2 (#3043)
    • 99f0a80 dependabot updates Mon Nov 28 19:36:32 UTC 2022 (#3042)
    • 01b39e7 Implement aws.ecs.* resource attributes (#2626)
    • 15ceaa2 dependabot updates Mon Nov 21 15:58:19 UTC 2022 (#3028)
    • 871ebe7 dependabot updates Sun Nov 13 17:55:48 UTC 2022 (#3000)
    • e79577d treat http.NoBody the same as a nil body (#2983)
    • 9a9abd4 Add support for filters to the otelgin package (#2965)
    • 44d8196 [net/http] enhance otelhttp example to support metric (#2610)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Current version of kin-openapi does not have openapi3.Swagger type

    Current version of kin-openapi does not have openapi3.Swagger type

    Current version of github.com/getkin/kin-openapi/openapi which is v0.66.0 does not have openapi3.Swagger type

    It would be great if your blog and this repo can be updated in line with the latest version

    Also have linked your blog here

    opened by kishaningithub 5
Owner
Mario Carrion
Software Architect and Hands-On Lead Backend Engineer
Mario Carrion
This is an example to demonstrate implementation golang microservices using domain driven design principles and sugestions from go-kit

go-kit DDD Domain Driven Design is prevelent and rising standard for organizing your microservice code. This design architecture emphasis on Code orga

Sourabh Mandal 1 Feb 9, 2022
🚀 link shortener which is using hexagonal architecture in Go

?? go-link-shortener-hexagonal Link Shortener which is using Hexagonal Architecture that compliant with clean code guidelines in Go. ├── README.md ├──

Ali Baran Eser 7 Feb 26, 2022
Microservice - A sample architecture of a microservice in go

#microservice Folder structure required. service certs config config.yaml loggin

null 0 Feb 3, 2022
Hexagonal Architecture implemented in GO

MSGO - Microservices in Go Hexagonal Architecture (Ports & Adapter) Wiki: Hexagonal Architecture Architecture benefits: loosely coupled interchangeabl

Vincent Villaluna 40 Aug 14, 2022
Hexagonal architecture bank account example

Hexagonal architecture bank account example Esse repositório contém um pouco dos meus estudos sobre arquitetura hexagonal. Go Lang é a linguagem utili

JoĂŁo Paulo Vanzuita 8 Jan 8, 2022
A banking microservice based on hexagonal architecure.

1. Banking Microservice Design Decisions 1. Hexagonal Architecture. 2. REST Api. 3. Dependency Injection. 4. Database Transactions. 5. Structured Erro

Ashef Habib Tishad 1 Feb 18, 2022
Assignment2 - A shared project making use of microservice architecture

This project is a shared project making use of microservice architecture, API's and a simple frontend to implement a start-up new concept called EduFi. The concept combines education and financial systems to create profit from studying.

Gabriel Goh 1 Jan 26, 2022
The microservices have a loosely coupled architecture design

ETI_Assignment1 5.1.3.1 Design consideration The microservices have a loosely coupled architecture design. The microservices created include Passenger

null 0 Dec 12, 2021
ftgogo - event-driven architecture demonstration application

ftgogo (food-to-gogo) is a Golang implementation of the FTGO application described in the book "Microservice Patterns" by Chris Richardson. A library edat was developed to provide for Golang many of the solutions that Eventuate, the framework used by FTGO, provides for Java.

Michael Stack 101 Jan 3, 2023
Authentication-microservice - Microservice for user authentication built with golang and gRPC

Authentication-microservice - Microservice for user authentication built with golang and gRPC

Isaque Veras 6 May 30, 2022
Customer-microservice - Microservice of customer built with golang and gRPC

?? Building microservices to manage customer data using Go and gRPC Command to g

Isaque Veras Labs 3 Sep 8, 2022
A pastebin clone implemented as microservice architecture.

pastebean Implementing a pastebin clone as a microservice architecture. Written using go-gin and gorm alongwith many other awesome open source Go liba

Rudraksh Pareek 3 Jan 24, 2022
Go-rifa-microservice - Clean Architecture template for Golang services

Test CI Go Clean template Clean Architecture template for Golang services Overvi

Evandro Martinelli 1 Sep 22, 2022
Microservice - Microservice golang & nodejs

Microservice Gabungan service dari bahasa pemograman go, nodejs Demo API ms-auth

Didin Tri Anggoro 2 May 21, 2022
This is demo / sample / example project using microservices architecture for Online Food Delivery App.

Microservices This is demo / sample / example project using microservices architecture for Online Food Delivery App. Architecture Services menu-servic

Nurali Virani 1 Nov 21, 2022
Trying to build an Ecommerce Microservice in Golang and Will try to make it Cloud Native - Learning Example extending the project of Nic Jackson

Golang Server Project Best Practices Dependency Injection :- In simple words, we want our functions and packages to receive the objects they depend on

Ujjwal Sharma 35 Nov 28, 2022
Golang Caching Microservice (bequant.io test project to get hired)

bequant test project How to use: Simply type docker-compose up -d --build db warden distributor in terminal while in project's directory. MySQL, Warde

Nikita Nikonov 4 May 14, 2022
An example microservice demo using kubernetes concepts like deployment, services, persistent volume and claims, secrets and helm chart

Docker vs Kubernetes Docker Kubernetes container tech, isolated env for apps infra management, multiple containers automated builds and deploy apps -

abhijit wakchaure 0 Dec 13, 2021
An production-ready microservice using Go and a few lightweight libraries

Go Micro Example This small sample project was created as a collection of the various things I've learned about best practices building microservices

Sean K Smith 102 Dec 26, 2022