Skip to content

Commit

Permalink
Merge branch 'main' into elixir-chat-service
Browse files Browse the repository at this point in the history
  • Loading branch information
julianocosta89 authored Oct 14, 2024
2 parents ffbe7b3 + 39f5e47 commit fbd9619
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/component-build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:
max-parallelism = 2
- name: Matrix Build and push demo images
if: steps.check_changes.outputs.skip == 'false'
uses: docker/build-push-action@v6.7.0
uses: docker/build-push-action@v6.9.0
with:
context: ${{ matrix.file_tag.context }}
file: ${{ matrix.file_tag.file }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: gradle/actions/wrapper-validation@v4.0.1
- uses: gradle/actions/wrapper-validation@v4.1.0
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ the release.
([#1707](https://github.com/open-telemetry/opentelemetry-demo/pull/1707))
* [chore] Fix gen-proto for accountingservice
([#1709](https://github.com/open-telemetry/opentelemetry-demo/pull/1709))
* [chore] Add depends on to otelcol to wait on healthy opensearch
([#1724](https://github.com/open-telemetry/opentelemetry-demo/pull/1724))
* [accountingservice] bump OpenTelemetry .NET Automatic Instrumentation
to 1.8.0 together with other dependencies
([#1727](https://github.com/open-telemetry/opentelemetry-demo/pull/1727))
* [chore] Fix binding for host's volume mount
([#1728](https://github.com/open-telemetry/opentelemetry-demo/pull/1728))
* [frontend] fix imageSlowLoad headers not applied
to 1.8.0 together with other dependencies
([#1733](https://github.com/open-telemetry/opentelemetry-demo/pull/1733))

## 1.11.1

Expand Down
13 changes: 11 additions & 2 deletions docker-compose.minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -585,15 +585,18 @@ services:
command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-extras.yml" ]
user: 0:0
volumes:
- ${HOST_FILESYSTEM}:/hostfs:ro
- ${HOST_FILESYSTEM}:/hostfs:ro,rslave
- ${DOCKER_SOCK}:/var/run/docker.sock:ro
- ${OTEL_COLLECTOR_CONFIG}:/etc/otelcol-config.yml
- ${OTEL_COLLECTOR_CONFIG_EXTRAS}:/etc/otelcol-config-extras.yml
ports:
- "${OTEL_COLLECTOR_PORT_GRPC}"
- "${OTEL_COLLECTOR_PORT_HTTP}"
depends_on:
- jaeger
jaeger:
condition: service_started
opensearch:
condition: service_healthy
logging: *logging
environment:
- ENVOY_PORT
Expand Down Expand Up @@ -653,4 +656,10 @@ services:
hard: 65536
ports:
- "9200"
healthcheck:
test: curl -s http://localhost:9200/_cluster/health | grep '"status":"green"'
start_period: 10s
interval: 5s
timeout: 10s
retries: 10
logging: *logging
13 changes: 11 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -748,15 +748,18 @@ services:
command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-extras.yml" ]
user: 0:0
volumes:
- ${HOST_FILESYSTEM}:/hostfs:ro
- ${HOST_FILESYSTEM}:/hostfs:ro,rslave
- ${DOCKER_SOCK}:/var/run/docker.sock:ro
- ${OTEL_COLLECTOR_CONFIG}:/etc/otelcol-config.yml
- ${OTEL_COLLECTOR_CONFIG_EXTRAS}:/etc/otelcol-config-extras.yml
ports:
- "${OTEL_COLLECTOR_PORT_GRPC}"
- "${OTEL_COLLECTOR_PORT_HTTP}"
depends_on:
- jaeger
jaeger:
condition: service_started
opensearch:
condition: service_healthy
logging: *logging
environment:
- ENVOY_PORT
Expand Down Expand Up @@ -816,4 +819,10 @@ services:
hard: 65536
ports:
- "9200"
healthcheck:
test: curl -s http://localhost:9200/_cluster/health | grep '"status":"green"'
start_period: 10s
interval: 5s
timeout: 10s
retries: 10
logging: *logging
10 changes: 5 additions & 5 deletions src/accountingservice/AccountingService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Confluent.Kafka" Version="2.4.0" />
<PackageReference Include="Google.Protobuf" Version="3.27.1" />
<PackageReference Include="Grpc.Tools" Version="2.64.0">
<PackageReference Include="Confluent.Kafka" Version="2.5.3" />
<PackageReference Include="Google.Protobuf" Version="3.28.2" />
<PackageReference Include="Grpc.Tools" Version="2.66.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
<PackageReference Include="OpenTelemetry.AutoInstrumentation" Version="1.7.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="OpenTelemetry.AutoInstrumentation" Version="1.8.0" />
</ItemGroup>

<ItemGroup>
Expand Down
17 changes: 12 additions & 5 deletions src/frontend/components/ProductCard/ProductCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ interface IProps {
product: Product;
}

async function getImageWithHeaders(url: RequestInfo, headers: Record<string, string>) {
const res = await fetch(url, { headers });
async function getImageWithHeaders(requestInfo: Request) {
const res = await fetch(requestInfo);
return await res.blob();
}

Expand All @@ -33,9 +33,16 @@ const ProductCard = ({
const [imageSrc, setImageSrc] = useState<string>('');

useEffect(() => {
const requestInfo = new Request('/images/products/' + picture);
const headers = { 'x-envoy-fault-delay-request': imageSlowLoad.toString(), 'Cache-Control': 'no-cache' };
getImageWithHeaders(requestInfo, headers).then(blob => {
const headers = new Headers();
headers.append('x-envoy-fault-delay-request', imageSlowLoad.toString());
headers.append('Cache-Control', 'no-cache')
const requestInit = {
method: "GET",
headers: headers
};
const image_url ='/images/products/' + picture
const requestInfo = new Request(image_url, requestInit);
getImageWithHeaders(requestInfo).then(blob => {
setImageSrc(URL.createObjectURL(blob));
});
}, [imageSlowLoad, picture]);
Expand Down
3 changes: 2 additions & 1 deletion src/productcatalogservice/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ func main() {
}
log.Println("Shutdown meter provider")
}()
openfeature.AddHooks(otelhooks.NewTracesHook())
err := openfeature.SetProvider(flagd.NewProvider())
if err != nil {
log.Fatal(err)
Expand Down Expand Up @@ -300,7 +301,7 @@ func (p *productCatalog) checkProductFailure(ctx context.Context, id string) boo
if id != "OLJCESPC7Z" {
return false
}
openfeature.AddHooks(otelhooks.NewTracesHook())

client := openfeature.NewClient("productCatalog")
failureEnabled, _ := client.BooleanValue(
ctx, "productCatalogFailure", false, openfeature.EvaluationContext{},
Expand Down

0 comments on commit fbd9619

Please sign in to comment.