Skip to content

Commit e4135ab

Browse files
authored
chore: update rideshare examples (#4683)
1 parent 6712f54 commit e4135ab

File tree

9 files changed

+176
-127
lines changed

9 files changed

+176
-127
lines changed

examples/language-sdk-instrumentation/dotnet/rideshare/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG SDK_VERSION=8.0
22
# The build images takes an SDK image of the buildplatform, so the platform the build is running on.
3-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:$SDK_VERSION AS build
3+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:$SDK_VERSION-bookworm-slim AS build
44

55
ARG TARGETPLATFORM
66
ARG BUILDPLATFORM
@@ -20,7 +20,7 @@ RUN dotnet publish -o . --framework net$SDK_VERSION --runtime linux-x64 --no-sel
2020
FROM --platform=linux/amd64 pyroscope/pyroscope-dotnet:0.13.0-glibc AS sdk
2121

2222
# Runtime only image of the targetplatfrom, so the platform the image will be running on.
23-
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:$SDK_VERSION
23+
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:$SDK_VERSION-noble-chiseled-extra
2424

2525
WORKDIR /dotnet
2626

@@ -44,6 +44,7 @@ ENV PYROSCOPE_PROFILING_CONTENTION_ENABLED=true
4444
ENV PYROSCOPE_PROFILING_EXCEPTION_ENABLED=true
4545
ENV PYROSCOPE_PROFILING_HEAP_ENABLED=true
4646
ENV RIDESHARE_LISTEN_PORT=5000
47+
ENV ASPNETCORE_URLS=http://*:5000
4748

4849

49-
CMD sh -c "ASPNETCORE_URLS=http://*:${RIDESHARE_LISTEN_PORT} exec dotnet /dotnet/example.dll"
50+
CMD ["/dotnet/example.dll"]

examples/language-sdk-instrumentation/dotnet/rideshare/docker-compose.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ services:
44
ports:
55
- 4040:4040
66
us-east:
7+
platform: linux/amd64
78
ports:
89
- 5000
910
environment:
@@ -14,6 +15,7 @@ services:
1415
build:
1516
context: .
1617
eu-north:
18+
platform: linux/amd64
1719
ports:
1820
- 5000
1921
environment:
@@ -23,9 +25,8 @@ services:
2325
- RIDESHARE_LISTEN_PORT=5000
2426
build:
2527
context: .
26-
args:
27-
SDK_VERSION: "6.0"
2828
ap-south:
29+
platform: linux/amd64
2930
ports:
3031
- 5000
3132
environment:
@@ -36,6 +37,7 @@ services:
3637
build:
3738
context: .
3839
ap-south-alpine:
40+
platform: linux/amd64
3941
ports:
4042
- 5000
4143
environment:

examples/language-sdk-instrumentation/java/rideshare/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=$BUILDPLATFORM sapmachine:17-jdk-headless AS builder
1+
FROM --platform=$BUILDPLATFORM sapmachine:21-jdk-headless AS builder
22

33
WORKDIR /opt/app
44

@@ -17,7 +17,7 @@ COPY src src
1717
RUN ./gradlew assemble --no-daemon
1818

1919

20-
FROM sapmachine:17-jdk-headless
20+
FROM sapmachine:21-jdk-headless
2121

2222
RUN apt-get update && apt-get install ca-certificates -y && update-ca-certificates
2323

examples/language-sdk-instrumentation/java/rideshare/build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id("java")
3-
id("org.springframework.boot") version "2.7.0"
4-
id("io.spring.dependency-management") version "1.0.11.RELEASE"
3+
id("org.springframework.boot") version "3.3.6"
4+
id("io.spring.dependency-management") version "1.1.6"
55
}
66

77
group = "org.example"
@@ -11,6 +11,8 @@ repositories {
1111
mavenCentral()
1212
}
1313

14+
ext["tomcat.version"] = "10.1.35"
15+
1416
dependencies {
1517
implementation("io.pyroscope:agent:2.1.2")
1618
implementation("org.jetbrains:annotations:26.0.2")

examples/language-sdk-instrumentation/python/rideshare/flask/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM python:3.9
1+
FROM python:3.12-slim
22

3-
RUN pip3 install flask pyroscope-io==0.8.13 pyroscope-otel==0.4.1
3+
RUN pip3 install flask pyroscope-io==0.8.11 pyroscope-otel==0.4.1
44
RUN pip3 install opentelemetry-api opentelemetry-sdk opentelemetry-instrumentation-flask opentelemetry-exporter-otlp-proto-grpc
55

66
ENV FLASK_ENV=development
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby-3.2.1
1+
ruby-3.3.9

examples/language-sdk-instrumentation/ruby/rideshare_rails/Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
FROM ruby:3.2.2
1+
FROM ruby:3.3.9-slim
2+
3+
# Install runtime and build dependencies
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
libsqlite3-0 \
6+
libyaml-0-2 \
7+
build-essential \
8+
libsqlite3-dev \
9+
libyaml-dev \
10+
pkg-config \
11+
&& rm -rf /var/lib/apt/lists/*
212

313
RUN mkdir -p /usr/src/app
414
WORKDIR /usr/src/app
515

6-
ENV RAILS_ENV production
7-
ENV RAILS_SERVE_STATIC_FILES true
8-
ENV RAILS_LOG_TO_STDOUT true
16+
ENV RAILS_ENV=production
17+
ENV RAILS_SERVE_STATIC_FILES=true
18+
ENV RAILS_LOG_TO_STDOUT=true
919

1020
COPY Gemfile /usr/src/app/
1121
COPY Gemfile.lock /usr/src/app/

examples/language-sdk-instrumentation/ruby/rideshare_rails/Gemfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
source "https://rubygems.org"
22
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
33

4-
ruby "3.2.2"
4+
ruby "3.3.9"
55

66
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
7-
gem "rails", "~> 7.0.8"
7+
gem "rails", "~> 7.1.5", ">= 7.1.5.2"
8+
9+
# Security updates for CVE-2025-24293
10+
gem "activestorage", "~> 7.1.5", ">= 7.1.5.2"
11+
12+
# Security update for nokogiri CVE (GHSA-353f-x4gh-cqq8)
13+
gem "nokogiri", ">= 1.18.9"
814

915
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
1016
gem "sprockets-rails"
@@ -13,7 +19,7 @@ gem "sprockets-rails"
1319
gem "sqlite3", "~> 1.4"
1420

1521
# Use the Puma web server [https://github.com/puma/puma]
16-
gem "puma", "~> 5.6"
22+
gem "puma", "~> 6.0"
1723

1824
gem 'pyroscope', '= 0.6.7'
1925

0 commit comments

Comments
 (0)