Getting Fastly service ID in VCL



  • Cassandra Dixon

    The variable req.service_id will return the Fastly service_id. For instance, if you are using a custom logging format in your vcl, you can set the call to your format:

    log {"syslog "}req.service_id{" my_logging_endpoint_name :: "} You can then use the same vcl within different services.

  • markwainwright

    @cassandra Brilliant, thanks! I looked everywhere for that and couldn't find it.

Please sign in to leave a comment.