Skip to content

Commit b1e7edc

Browse files
authored
Merge pull request #457 from gofr-dev/release/v1.3.1
Release v1.3.1
2 parents 95da216 + 8d4c7d8 commit b1e7edc

File tree

32 files changed

+263
-53
lines changed

32 files changed

+263
-53
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
FROM golang:1.16
1+
FROM golang:1.21
22

33
RUN mkdir -p /go/src/gofr.dev
44
WORKDIR /go/src/gofr.dev
55
COPY . .
66

7-
RUN go build -ldflags "-linkmode external -extldflags -static" -a examples/simple-api/main.go
7+
RUN go build -ldflags "-linkmode external -extldflags -static" -a examples/http-server/main.go
88

99
FROM alpine:latest
1010
RUN apk add --no-cache tzdata ca-certificates

docs/navigation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const navigation = [
77
{ title: 'Connecting Redis', href: '/docs/quick-start/connecting-redis' },
88
{ title: 'Connecting MySQL', href: '/docs/quick-start/connecting-mysql' },
99
{ title: 'Observability', href: '/docs/quick-start/observability' },
10-
{ title: 'Adding REST Handlers', href: '/docs/quick-start/add-rest-handler' },
10+
{ title: 'Adding REST Handlers', href: '/docs/quick-start/add-rest-handlers' },
1111
],
1212
},
1313
{

docs/quick-start/observability/page.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ GoFr automatically exports traces for all requests and responses. GoFr uses
149149
{% new-tab-link title="OpenTelemetry" href="https://opentelemetry.io/docs/concepts/what-is-opentelemetry/" /%} , a popular tracing framework, to
150150
automatically add traces to all requests and responses.
151151

152+
GoFr has support for both zipkin as well as jaeger trace exporters.
153+
152154
**Automatic Correlation ID Propagation:**
153155

154156
When a request enters your GoFr application, GoFr automatically generates a correlation-ID `X-Correlation-ID` and adds it
@@ -179,14 +181,15 @@ DB_NAME=test_db
179181
DB_PORT=3306
180182

181183
# tracing configs
184+
TRACE_EXPORTER=zipkin // Supported : zipkin,jaeger
182185
TRACER_HOST=localhost
183186
TRACER_PORT=2005
184187

185188
LOG_LEVEL=DEBUG
186189
```
187190

188191
> **NOTE:** If the value of `TRACER_PORT` is not
189-
> provided, gofr uses port `9411` by default.
192+
> provided, gofr uses port `9411` by default.
190193
191194
Open {% new-tab-link title="zipkin" href="http://localhost:2005/zipkin/" /%} and search by TraceID (correlationID) to see the trace.
192195
{% figure src="/quick-start-trace.png" alt="Zapin traces" /%}

examples/grpc-server/configs/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
GRPC_PORT=10000
1+
GRPC_PORT=10000

examples/http-server-using-redis/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.16
1+
FROM golang:1.21
22

33
RUN mkdir /src/
44
WORKDIR /src/
@@ -10,6 +10,6 @@ FROM alpine:latest
1010
RUN apk add --no-cache tzdata ca-certificates
1111
COPY --from=0 /src/main /main
1212
COPY --from=0 /src/configs /configs
13-
EXPOSE 9000
13+
EXPOSE 8000
1414

1515
CMD ["/main"]

examples/http-server-using-redis/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func TestHTTPServerUsingRedis(t *testing.T) {
3232
statusCode int
3333
}{
3434
{"post handler", http.MethodPost, []byte(`{"key1":"GoFr"}`), "/redis",
35-
http.StatusOK},
35+
http.StatusCreated},
3636
{"post invalid body", http.MethodPost, []byte(`{key:abc}`), "/redis",
3737
http.StatusInternalServerError},
3838
{"get handler", http.MethodGet, nil, "/redis/key1", http.StatusOK},

examples/http-server/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.16
1+
FROM golang:1.21
22

33
RUN mkdir /src/
44
WORKDIR /src/

examples/http-server/configs/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ DB_NAME=test
1111
DB_PORT=2001
1212
DB_DIALECT=mysql
1313

14+
TRACE_EXPORTER=zipkin
1415
TRACER_HOST=localhost
1516
TRACER_PORT=2005

examples/using-add-rest-handlers/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.16
1+
FROM golang:1.21
22

33
RUN mkdir /src/
44
WORKDIR /src/
@@ -10,6 +10,6 @@ FROM alpine:latest
1010
RUN apk add --no-cache tzdata ca-certificates
1111
COPY --from=0 /src/main /main
1212
COPY --from=0 /src/configs /configs
13-
EXPOSE 9000
13+
EXPOSE 9090
1414

1515
CMD ["/main"]

examples/using-add-rest-handlers/configs/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ DB_NAME=test
88
DB_PORT=2001
99
DB_DIALECT=mysql
1010

11+
TRACE_EXPORTER=zipkin
1112
TRACER_HOST=localhost
1213
TRACER_PORT=2005

0 commit comments

Comments
 (0)