Skip to content

Commit

Permalink
Merge branch 'quarkiverse:main' into issue-674-gcp-logging-spaninfo
Browse files Browse the repository at this point in the history
  • Loading branch information
wabrit committed Sep 24, 2024
2 parents b48aeef + 500be5d commit 8fa4e2f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,15 @@
"contributions": [
"code"
]
},
{
"login": "wabrit",
"name": "wabrit",
"avatar_url": "https://avatars.githubusercontent.com/u/4264910?v=4",
"profile": "https://github.com/wabrit",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Quarkiverse - Quarkus Google Cloud Services
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-21-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-22-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
[![version](https://img.shields.io/maven-central/v/io.quarkiverse.googlecloudservices/quarkus-google-cloud-services-bom)](https://repo1.maven.org/maven2/io/quarkiverse/googlecloudservices/)
[![Build](https://github.com/quarkiverse/quarkus-google-cloud-services/workflows/Build/badge.svg)](https://github.com/quarkiverse/quarkus-google-cloud-services/actions?query=workflow%3ABuild)
Expand Down Expand Up @@ -69,6 +69,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/snazy"><img src="https://avatars.githubusercontent.com/u/957468?v=4?s=100" width="100px;" alt="Robert Stupp"/><br /><sub><b>Robert Stupp</b></sub></a><br /><a href="https://github.com/quarkiverse/quarkus-google-cloud-services/commits?author=snazy" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://uk.linkedin.com/in/hchigadani"><img src="https://avatars.githubusercontent.com/u/12896715?v=4?s=100" width="100px;" alt="Hemantkumar Chigadani"/><br /><sub><b>Hemantkumar Chigadani</b></sub></a><br /><a href="https://github.com/quarkiverse/quarkus-google-cloud-services/commits?author=Hemantkumar-Chigadani" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/wabrit"><img src="https://avatars.githubusercontent.com/u/4264910?v=4?s=100" width="100px;" alt="wabrit"/><br /><sub><b>wabrit</b></sub></a><br /><a href="https://github.com/quarkiverse/quarkus-google-cloud-services/commits?author=wabrit" title="Code">💻</a></td>
</tr>
</tbody>
</table>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package io.quarkiverse.googlecloudservices.logging.deployment;

import java.util.ArrayList;
import java.util.List;

import io.quarkiverse.googlecloudservices.logging.runtime.LoggingConfiguration;
import io.quarkiverse.googlecloudservices.logging.runtime.TraceInfoExtractor;
import io.quarkiverse.googlecloudservices.logging.runtime.cdi.LoggingProducer;
Expand All @@ -11,6 +14,7 @@
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.LogHandlerBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;

public class LoggingBuildSteps {

Expand Down Expand Up @@ -38,4 +42,14 @@ public UnremovableBeanBuildItem helperClasses() {
public LogHandlerBuildItem handler(LoggingConfiguration config, LoggingHandlerFactory factory) {
return new LogHandlerBuildItem(factory.create(config));
}

@BuildStep
public List<ReflectiveClassBuildItem> registerReflectiveClasses() {
List<ReflectiveClassBuildItem> items = new ArrayList<>();
// Required for native builds as LoggingHandler uses Gson to serialize severity values
items.add(ReflectiveClassBuildItem.builder("com.google.cloud.logging.Severity")
.fields(true)
.build());
return items;
}
}

0 comments on commit 8fa4e2f

Please sign in to comment.