Skip to content

Commit 6778c16

Browse files
-Fix file format. -Remove default from TraceContext. -Update the object return
-Install only the required plugins to function
1 parent ecf8bd1 commit 6778c16

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

build.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ $atchetypeVersion = $matches[1]
1919
Write-Host "atchetypeVersion: " $atchetypeVersion
2020

2121
# Clone and install function maven plugin
22-
git clone https://github.com/Microsoft/azure-maven-plugins.git -b master
22+
git clone https://github.com/Microsoft/azure-maven-plugins.git -b develop
2323
Push-Location -Path "./azure-maven-plugins" -StackName libraryDir
2424
Write-Host "Build and install azure-functions-maven-plugins"
25-
cmd.exe /c '.\..\mvnBuildSkipTests.bat'
25+
cmd.exe /c '.\..\mvnBuildFunctionPluginsSkipTests.bat'
2626
StopOnFailedExecution
2727
Pop-Location -StackName "libraryDir"
2828
$pluginPom = Get-Content ".\azure-maven-plugins\azure-functions-maven-plugin\pom.xml" | where {$_ -ne ""}

mvnBuildFunctionPluginsSkipTests.bat

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mvn clean install -pl build-tools,azure-maven-plugins-pom,azure-maven-plugin-lib,azure-functions-maven-plugin -Dmaven.javadoc.skip=true -Dmaven.test.skip -U -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B

src/main/java/com/microsoft/azure/functions/ExecutionContext.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public interface ExecutionContext {
3939
* Returns the trace context.
4040
* @return the trace context
4141
*/
42-
default TraceContext getTraceContext() {
43-
return new TraceContext(){};
42+
default TraceContext getTraceContext() {
43+
return null;
4444
}
4545
}
46+

src/main/java/com/microsoft/azure/functions/TraceContext.java

+4-11
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
package com.microsoft.azure.functions;
88

9-
import java.util.Collections;
109
import java.util.Map;
1110

1211
/**
@@ -20,23 +19,17 @@ public interface TraceContext {
2019
*
2120
* @return the TraceparentString from the Activity.
2221
*/
23-
default String getTraceparent() {
24-
return "";
25-
}
22+
String getTraceparent();
2623

2724
/**
2825
* Returns the Tracestate which is Activity.Current?.Id from host.
2926
* @return the Tracestate which is Activity.Current?.Id from host.
3027
*/
31-
default String getTracestate() {
32-
return "";
33-
}
28+
String getTracestate();
3429

3530
/**
3631
* Returns the attributes which correspond to the tags.
3732
* @return the attributes which correspond to the tags.
3833
*/
39-
default Map<String, String> getAttributes() {
40-
return Collections.<String, String>emptyMap();
41-
}
42-
}
34+
Map<String, String> getAttributes();
35+
}

0 commit comments

Comments
 (0)