Skip to content

Commit

Permalink
Merge pull request #177 from grafana/chore/bump-protobuf
Browse files Browse the repository at this point in the history
chore: bump com.google.protobuf:protobuf-java to 4.29.2
  • Loading branch information
aleks-p authored Jan 9, 2025
2 parents c65300b + 866fe43 commit 05f5dde
Show file tree
Hide file tree
Showing 7 changed files with 446 additions and 539 deletions.
4 changes: 2 additions & 2 deletions agent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id 'signing'

// https://github.com/johnrengelman/shadow
id "com.github.johnrengelman.shadow" version "7.0.0"
id 'com.github.johnrengelman.shadow' version '7.0.0'
}

sourceCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -21,7 +21,7 @@ dependencies {
api project(":async-profiler-context")
implementation('com.squareup.okhttp3:okhttp:4.12.0')
implementation("com.squareup.moshi:moshi:1.14.0")
api 'com.google.protobuf:protobuf-java:4.28.1'
api 'com.google.protobuf:protobuf-java:4.29.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.7.2'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.7.2'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.10.0'
Expand Down
4 changes: 2 additions & 2 deletions agent/src/main/java/io/pyroscope/javaagent/Snapshot.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public final class Snapshot {
public final Instant started;
public final Instant ended;
public final byte[] data;
public final JfrLabels.Snapshot labels;
public final JfrLabels.LabelsSnapshot labels;

Snapshot(Format format, final EventType eventType, final Instant started, final Instant ended,final byte[] data, JfrLabels.Snapshot labels) {
Snapshot(Format format, final EventType eventType, final Instant started, final Instant ended,final byte[] data, JfrLabels.LabelsSnapshot labels) {
this.format = format;
this.eventType = eventType;
this.started = started;
Expand Down
13 changes: 12 additions & 1 deletion async-profiler-context/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def asyncProfilerVersion = project.properties['async_profiler_version']
def pyroscopeVersion = project.properties['pyroscope_version']
dependencies {
api files("$buildDir/async-profiler/async-profiler.jar")
implementation 'com.google.protobuf:protobuf-java:3.21.1'
implementation 'com.google.protobuf:protobuf-java:4.29.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.7.2'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.7.2'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.10.0'
Expand Down Expand Up @@ -201,3 +201,14 @@ afterEvaluate {
}
}
}

tasks.register('generate-proto-classes') {
doLast {
exec {
commandLine 'protoc',
'-I', '.',
'--java_out', 'src/main/java',
'jfr_labels.proto'
}
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public static void run(LabelsSet labels, Runnable c) {
}
}

public static JfrLabels.Snapshot dump() {
JfrLabels.Snapshot.Builder sb = JfrLabels.Snapshot.newBuilder();
public static JfrLabels.LabelsSnapshot dump() {
JfrLabels.LabelsSnapshot.Builder sb = JfrLabels.LabelsSnapshot.newBuilder();

for (Ref<String> it : RefCounted.strings.valueToRef.values()) {
sb.putStrings(it.id, it.val);
Expand Down
Loading

0 comments on commit 05f5dde

Please sign in to comment.